Conversation
just 5 cases are likely to let some bugs slip through added a check for a range of years (1600 to 1699) and some additional centuries
coriolinus
left a comment
There was a problem hiding this comment.
Looks great! I like the way you implemented the procedural test; it's correct without giving away a complete implementation.
As with your other PRs, the soonest I can merge this is Monday the 27th, but I'm happy if another maintainer merges this before then.
|
I thought on this a bit more. I found it puzzling that bitwise inversion would actually make it work. So why did I think it passes all the tests? Because all the centuries tests check for We can ignore this PR but we should get a way to just run all tests in one command. |
|
For this reason, I have always been forced to run |
|
I found this relevant issue: rust-lang/rust#50363 |
The exercise has just 5 test cases. This can easily let some bugs slip through.
This adds a check for a range of years (1600 to 1699) and a few additional centuries. The range is kept short so the user isn't spammed with a huge list of incorrect years with wrong code. It also avoids having the full solution in the tests where students could stumble upon it.
I got this faulty code from a student which passes all the old tests: