-
Notifications
You must be signed in to change notification settings - Fork 1
Fix too strong conditions in tests #36
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
Conversation
| assertEq(Math.divUp(x, y), x / y); | ||
| } | ||
|
|
||
| function testDivUpWhenNumLargerAndNotDivisible(uint256 x, uint256 y) public { |
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.
I know test names are large but it makes reading a test report & the code easier by giving a clear context
I don't think it's the case for testDivUpNotDivisible which does not indicate whether it's the numerator or the denominator which is not divisible
I would recommend testDivUpNumNotDivisible and testDivUpNumDivisible, if making test names shorter is meaningful
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.
which does not indicate whether it's the numerator or the denominator which is not divisible
this is implicit (why would you care about the inverse)
But I can re-add that if you want!
MerlinEgalite
left a comment
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.
LGTM
56c9dd1 to
406c728
Compare
406c728 to
f13d329
Compare
No description provided.