Skip to content

leap: Improve test suite to cover corner case. #955

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
Oct 15, 2017

Conversation

paulrex
Copy link
Contributor

@paulrex paulrex commented 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 the year is evenly
divisble by 16.

This commit changes one of the test cases so that is no longer possible.

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.
@Insti Insti merged commit 091150c into exercism:master Oct 15, 2017
@Insti
Copy link
Contributor

Insti commented Oct 15, 2017

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
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.

3 participants