mirror of
https://github.com/google/comprehensive-rust.git
synced 2024-12-14 22:15:54 +02:00
Add test case for invalid non digit cc number (#1182)
Adding this test case to handle case where we have non-numeric cc number along with a valid cc number. This is discovered when we filter with is_numeric() instead of !is_whitespace() all test case does pass. To handle such scenario adding this test case.
This commit is contained in:
parent
09d1265cbb
commit
3813d0b6f1
@ -51,6 +51,7 @@ fn main() {
|
||||
#[test]
|
||||
fn test_non_digit_cc_number() {
|
||||
assert!(!luhn("foo"));
|
||||
assert!(!luhn("foo 0 0"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Loading…
Reference in New Issue
Block a user