Skip to content

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

Merged
Insti merged 1 commit intoexercism:masterfrom
paulrex:improve-tests-for-leap-exercise
Oct 15, 2017
Merged

leap: Improve test suite to cover corner case.#955
Insti merged 1 commit intoexercism:masterfrom
paulrex:improve-tests-for-leap-exercise

Conversation

@paulrex
Copy link
Copy Markdown
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
Copy Markdown
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