You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-18 07:07:35 +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:
@ -51,6 +51,7 @@ fn main() {
|
||||
#[test]
|
||||
fn test_non_digit_cc_number() {
|
||||
assert!(!luhn("foo"));
|
||||
assert!(!luhn("foo 0 0"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
Reference in New Issue
Block a user