leap: Improve test suite to cover corner case.#955
Merged
Insti merged 1 commit intoexercism:masterfrom Oct 15, 2017
Merged
Conversation
Currently, the test suite has a loophole where it is possible to pass all the tests with a function that simply checks if the year is evenly divisble by 16. This commit changes one of the test cases so that is no longer possible.
petertseng
approved these changes
Oct 15, 2017
Contributor
|
Thanks @paulrex ❤️ |
petertseng
pushed a commit
to exercism/haskell
that referenced
this pull request
Oct 15, 2017
Currently, the test suite has a loophole where it is possible to pass all the tests with a function that simply checks if year `mod` 16 == 0. This commit changes one of the test cases so that is no longer possible. exercism/problem-specifications#955
cruxicheiros
added a commit
to cruxicheiros/problem-specifications
that referenced
this pull request
Oct 24, 2017
Currently, it's possible to pass all the unit tests by checking if `(year % 100) == (year % 400)`. This commit changes one of the test cases so that this is no longer possible. Note that this is a separate issue to exercism#955 -- however, 1996, like 2020, is not divisible by 16, so that loophole will remain closed.
rpottsoh
pushed a commit
that referenced
this pull request
Oct 24, 2017
Currently, it's possible to pass all the unit tests by checking if `(year % 100) == (year % 400)`. This commit changes one of the test cases so that this is no longer possible. Note that this is a separate issue to #955 -- however, 1996, like 2020, is not divisible by 16, so that loophole will remain closed.
petertseng
added a commit
to petertseng/exercism-ceylon
that referenced
this pull request
Nov 5, 2017
1.1.0: exercism/problem-specifications#955 1.2.0: `y % 4 == 0 && y % 100 == y % 400` exercism/problem-specifications#971
Closed
13 tasks
ZapAnton
added a commit
to ZapAnton/rust
that referenced
this pull request
Nov 19, 2018
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, the test suite has a loophole where it is possible to pass
all the tests with a function that simply checks if the year is evenly
divisble by 16.
This commit changes one of the test cases so that is no longer possible.