Skip to content

Commit 91fd3c7

Browse files
authored
isbn-verifier 2.3.0.4: Use an otherwise-valid ISBN in invalid char test (#670)
Set new test case to be 3-598-P1581-X. This will actually catch incorrect solutions - when invalid characters (P) are treated as 0. 3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 0 * 6 + 1 * 5 + 5 * 4 + 8 * 3 + 1 * 2 + 10 * 1 = 264 264 is divisible by 11. The previous case did NOT have this property: 3 * 10 + 5 * 9 + 9 * 8 + 8 * 7 + 2 * 6 + 0 * 5 + 5 * 4 + 0 * 3 + 7 * 2 + 0 * 1 = 249 249 is NOT divisible by 11. exercism/problem-specifications#1212 exercism/problem-specifications#1217
1 parent c3704e9 commit 91fd3c7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

exercises/isbn-verifier/package.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: isbn-verifier
2-
version: 2.2.0.3
2+
version: 2.3.0.4
33

44
dependencies:
55
- base

exercises/isbn-verifier/test/Tests.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ cases = [ Case { description = "valid isbn number"
4040
, expected = False
4141
}
4242
, Case { description = "invalid character in isbn"
43-
, input = "3-598-2K507-0"
43+
, input = "3-598-P1581-X"
4444
, expected = False
4545
}
4646
, Case { description = "X is only valid as a check digit"

0 commit comments

Comments
 (0)