diff --git a/src/test/VestedERC20.t.sol b/src/test/VestedERC20.t.sol index d7d434a..2e70bc5 100644 --- a/src/test/VestedERC20.t.sol +++ b/src/test/VestedERC20.t.sol @@ -147,6 +147,9 @@ contract VestedERC20Test is DSTest { function testCorrectness_wrapAndClaim_transfer(uint224 underlyingAmount_) public { + // last test assertion will underflow if we don't + vm.assume(underlyingAmount_ > 7); + uint256 underlyingAmount = uint256(underlyingAmount_); // clear wrapped token balance @@ -171,7 +174,7 @@ contract VestedERC20Test is DSTest { // go to when 50% of the vest is done vm.warp(startTimestamp + 50 days); - + // redeem from this redeemedUnderlyingAmount = wrappedToken.redeem(address(this)); assertGe( diff --git a/src/test/utils/VM.sol b/src/test/utils/VM.sol index a733a4a..a1211bd 100644 --- a/src/test/utils/VM.sol +++ b/src/test/utils/VM.sol @@ -8,4 +8,6 @@ interface VM { function expectRevert(bytes calldata) external; function prank(address sender) external; + + function assume(bool) external; }