Skip to content

Commit e6e57ef

Browse files
Merge pull request exercism#1631 from lemoncurry/luhn-updatetest
luhn: update to v1.4.0
2 parents cf6ea2f + f5c4426 commit e6e57ef

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

exercises/luhn/.meta/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.2.0
1+
1.4.0

exercises/luhn/src/test/java/LuhnValidatorTest.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,24 @@ public void testInvalidCreditCardInvalid() {
5454
assertFalse(luhnValidator.isValid("8273 1232 7352 0569"));
5555
}
5656

57+
@Ignore("Remove to run test")
58+
@Test
59+
public void testValidNumberWithAnEvenNumberOfDigits() {
60+
assertTrue(luhnValidator.isValid("095 245 88"));
61+
}
62+
5763
@Ignore("Remove to run test")
5864
@Test
5965
public void testStringsContainingNonDigitInvalid() {
6066
assertFalse(luhnValidator.isValid("055a 444 285"));
6167
}
6268

69+
@Ignore("Remove to run test")
70+
@Test
71+
public void testValidStringsWithANonDigitAtEndInvalid() {
72+
assertFalse(luhnValidator.isValid("059a"));
73+
}
74+
6375
@Ignore("Remove to run test")
6476
@Test
6577
public void testStringContainingPunctuationInvalid() {

0 commit comments

Comments
 (0)