Skip to content
This repository was archived by the owner on Apr 18, 2026. It is now read-only.

Commit d5133d6

Browse files
committed
test: fix bounds in the revert conditions
1 parent f4e13c9 commit d5133d6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

test/TestPercentageMath.sol

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ contract TestPercentageMath is Test {
99
uint256 internal constant PERCENTAGE_FACTOR = 100_00;
1010
uint256 internal constant HALF_PERCENTAGE_FACTOR = 50_00;
1111

12-
uint256 internal constant MAX_UINT256_PERCENT_UP = type(uint256).max - PERCENTAGE_FACTOR - 1;
12+
uint256 internal constant MAX_UINT256_PERCENT_UP = type(uint256).max - (PERCENTAGE_FACTOR - 1);
1313
uint256 internal constant MAX_UINT256_PERCENT_HALF_UP = type(uint256).max - HALF_PERCENTAGE_FACTOR;
1414

1515
PercentageMathMock mock;

test/TestWadRayMath.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ contract TestWadRayMath is Test {
1313
uint256 internal constant RAY_WAD_RATIO = RAY / WAD;
1414
uint256 internal constant HALF_RAY_WAD_RATIO = RAY_WAD_RATIO / 2;
1515

16-
uint256 internal constant MAX_UINT256_WAD_UP = type(uint256).max - WAD - 1;
16+
uint256 internal constant MAX_UINT256_WAD_UP = type(uint256).max - (WAD - 1);
1717
uint256 internal constant MAX_UINT256_WAD_HALF_UP = type(uint256).max - HALF_WAD;
1818

19-
uint256 internal constant MAX_UINT256_RAY_UP = type(uint256).max - RAY - 1;
19+
uint256 internal constant MAX_UINT256_RAY_UP = type(uint256).max - (RAY - 1);
2020
uint256 internal constant MAX_UINT256_RAY_HALF_UP = type(uint256).max - HALF_RAY;
2121

2222
WadRayMathMock mock;

0 commit comments

Comments
 (0)