-
-
Notifications
You must be signed in to change notification settings - Fork 358
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
Luhn: A new test case with odd number of digits #1543
Conversation
@fahadhk The test cases that we use in the luhn exercise are generated from shared metadata found in https://github.com/exercism/problem-specifications/blob/main/exercises/luhn/canonical-data.json. Could you submit a PR there instead of to this repo? That way other tracks can also benefit from this new test case and we can just regenerate the exercise. |
This PR has been open for quite a while. Are you still interested in working on this @fahadhk? |
@ErikSchierboom Pardon I was inactive for a while. Let me add a PR to the specification repo. I will post it here once it is done. Thank you for pointing to that place. Cheers |
Cheers |
@fahadhk Thanks! I'll update once that PR is merged. |
@fahadhk The prob-specs PR has been merged. This PR can now be updated. To do so, please do the following:
This should update the luhn exercise's tests and |
@fahadhk Small bump. See my comment above for instructions on how to proceed. |
A new positive test case with odd number of digits and non-zero first digit.
A new positive test case with odd number of digits and non-zero first digit.
@ErikSchierboom Sorry I was away. Let me do it now. I have a updated tests.toml and test file with the test that I proposed by skipping others. Looking forward to hear from you. P.S. Meanwhile bumped in to a problem of missing DLL while running Generator on ubuntu 20.04 LTS, solved it using |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks!
A new positive test case with odd number of digits and non-zero first digit.
I have seen a solution in Golang which passes all the tests for Luhn containing odd number of digits and never reads the first digit.
It happens because in all such cases the first digit is zero . I am sure it is also relevant for C#.