Skip to content

Conversation

@MathisGD
Copy link
Contributor

@MathisGD MathisGD commented Aug 3, 2022

No description provided.

@MathisGD MathisGD requested review from a team, MerlinEgalite, QGarchery and Rubilmax August 3, 2022 10:11
@MathisGD MathisGD self-assigned this Aug 3, 2022
@MathisGD MathisGD requested a review from QGarchery August 3, 2022 11:34
assertEq(Math.divUp(x, y), x / y);
}

function testDivUpWhenNumLargerAndNotDivisible(uint256 x, uint256 y) public {
Copy link
Contributor

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

Copy link
Contributor Author

@MathisGD MathisGD Aug 3, 2022

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!

Copy link
Contributor

@MerlinEgalite MerlinEgalite left a comment

Choose a reason for hiding this comment

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

LGTM

@MathisGD MathisGD force-pushed the test/fix-conditions branch from 56c9dd1 to 406c728 Compare August 3, 2022 22:02
@MathisGD MathisGD force-pushed the test/fix-conditions branch from 406c728 to f13d329 Compare August 3, 2022 22:03
@MathisGD MathisGD merged commit 7ff0b73 into main Aug 3, 2022
@Rubilmax Rubilmax deleted the test/fix-conditions branch December 13, 2022 14:09
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.

5 participants