Skip to content

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

Merged
petertseng merged 2 commits intoexercism:masterfrom
paulrex:improve-tests-for-leap-exercise
Oct 15, 2017
Merged

leap: Improve test suite to cover corner case.#606
petertseng merged 2 commits intoexercism:masterfrom
paulrex:improve-tests-for-leap-exercise

Conversation

@paulrex
Copy link
Copy Markdown
Contributor

@paulrex paulrex commented Oct 14, 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.

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.
Copy link
Copy Markdown
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice catch.

Please, I need you to send a pull request to https://github.com/exercism/problem-specifications/blob/master/exercises/leap/canonical-data.json, otherwise the Haskell will no longer be in compliance with that file (for good reason, but still not in compliance). And the other reason to do so is so that other tracks can use it. We wouldn't want to be selfish.

@paulrex
Copy link
Copy Markdown
Contributor Author

paulrex commented Oct 15, 2017

Certainly. exercism/problem-specifications#955

Copy link
Copy Markdown
Member

@petertseng petertseng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As you can see, I increased the version to match problem-specifications as well. Minor enough that I didn't want to ask you to do it and make everyone wait for one more cycle, so I just did it.

@petertseng petertseng merged commit a3af3e0 into exercism:master Oct 15, 2017
@petertseng
Copy link
Copy Markdown
Member

Excellent, thank you!

@ioistired
Copy link
Copy Markdown

I just fetched leap and year `mod` 16 == 0 still passes.
What needs to happen so it's updated?

@petertseng
Copy link
Copy Markdown
Member

https://github.com/exercism/trackler/tree/master/tracks directory contains haskell repo. That needs to update, then trackler gem version needs to be published, then https://github.com/exercism/exercism.io/blob/master/Gemfile.lock#L186 needs to use the new trackler version.

@ioistired
Copy link
Copy Markdown

The folder in tracks/ is this repository, so that's done.
Is all that's left to bump the trackler gem version and publish it?

@petertseng
Copy link
Copy Markdown
Member

Right.

2.2.1.46 was released at (sometime around the time when exercism/DEPRECATED.trackler@6c47e10 was made, too lazy to check the actual time)

It was deployed to the website at (notification in exercism/dev channel)

14:58:21 < gitter> Heroku [exercism] deployed fdde061b

@ioistired
Copy link
Copy Markdown

Excellent. Just tested and it's fixed now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants