Skip to content

isbn-verifier 2.3.0.4: Use an otherwise-valid ISBN in invalid char test #670

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2018
Merged

Conversation

petertseng
Copy link
Member

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

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
@petertseng petertseng changed the title isbn-verifier: Use an otherwise-valid ISBN in invalid char test isbn-verifier 2.3.0.4: Use an otherwise-valid ISBN in invalid char test Mar 31, 2018
@petertseng petertseng merged commit 91fd3c7 into exercism:master Mar 31, 2018
@petertseng petertseng deleted the isbn branch March 31, 2018 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant