-
-
Notifications
You must be signed in to change notification settings - Fork 195
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
say: Rewrite tests to use hspec with fail-fast. #292
Conversation
Did not think we would have bounds that low! But it is not for me to question 👍 |
You can question anything! 😄 Considering that there is no json for this exercise, we can change it as we like. So, what would you like to change ❓ |
I suppose what I really meant was: this PR is just the conversion from HUnit to HSpec, talking about changes to the tests can come separately! But here is an OK place I suppose, since the lines are getting changed anyway. Two separate questions for us to answer:
|
You are right, there is no reason to restrict the values. I completely agree about dropping the upper limit, but I'm still unsure about the lower limit. Do you think that would add something interesting to the exercise? If we decide to drop the lower limit too, there is no reason to return a |
Take my opinion with a grain of salt since I haven't done this exercise myself in any language. I do think negatives would be somewhat interesting (probably more interesting than going to trillions, quadrillions, etc.), but the question of whether it's interesting enough to be worth adding? Well, if unsure I'll suggest to try it! But I really don't feel strongly. It may be the case that Maybe has to be kept though because no matter how far someone goes with trillions, quadrillions, etc. there still has to be a point at which they had to stop. Unless we expect solutions to be able to arbitrarily combine latin prefixes?! |
To patch any working solution to say negative numbers it is trivial. We just have to add this line: inEnglish x | x < 0 = ("minus " ++) <$> inEnglish (-x) So I don't think this would make the problem more interesting. That said, it would not be worse. Just tell me the test cases you want to add and I'll fix this PR. 👍 |
OK. On your recommendation that it would not be more interesting, then I suggest no more tests and merge as-is. If a preponderance of other track maintaners do decide to expand when someone creates say/canonical-data.json then we can consider. |
- Rewrite tests to use `hspec`. - Remote upper-limit test.
I removed the upper-limit test, but left the test for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, so the idea is that this makes life better for the student - the student can now go to trillions if desired (the tests don't stop you now!) whereas before they could not.
OK
👍
If you prefer I can drop the lower limit test too. I just would like to avoid, for now, to expect valid negative outputs. |
It's good as-is. Besides, if removed the lower limit test, then a student might ask "Why are all tests |
Related to #211.