Skip to content
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

Add test to dominoes checking proper reversing #697

Conversation

monsterkrampe
Copy link
Contributor

I was mentoring a student and they submitted an implementation that passed all tests but was still not correct. In essence it allowed to use a domino in its reversed and unreversed form at the same time by only checking if one of the 2 positions matched any of the two other ones. While this would make the existing test fail, checking that [1,2] is not chainable, they also handled the case of only one domino separately, so this test actually passed.

In this PR I add another test that shall check if reversing is handled properly. The two dominoes [1, 2], [3, 2] are not chainable according to the exercise description.
(The solution submitted by the student fails on this test as expected.)

Copy link

github-actions bot commented Oct 1, 2024

This PR touches files which potentially affect the outcome of the tests of an exercise. This will cause all students' solutions to affected exercises to be re-tested.

If this PR does not affect the result of the test (or, for example, adds an edge case that is not worth rerunning all tests for), please add the following to the merge-commit message which will stops student's tests from re-running. Please copy-paste to avoid typos.

[no important files changed]

For more information, refer to the documentation. If you are unsure whether to add the message or not, please ping @exercism/maintainers-admin in a comment. Thank you!

@ryanplusplus
Copy link
Member

Hey @monsterkrampe, these tests are generated from the upstream canonical tests at https://github.com/exercism/problem-specifications/blob/main/exercises/dominoes/canonical-data.json. If you think that a test is missing, you should first raise this issue in the forum (https://forum.exercism.org/) to start the process of getting the upstream canonical tests updated. Once those are updated we can update this track and regenerate the tests.

@monsterkrampe
Copy link
Contributor Author

Ah, I did not know that, thank you very much! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants