Skip to content

Commit

Permalink
test: fix invariant fail
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaRoze committed May 27, 2024
1 parent 57a198e commit 663b9f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions test/unit/esr/ESR.Fuzz.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ contract ESRFuzzTest is ESRTest {
//totalAssets should be equal to the balance after SMEAR has passed
function invariant_totalAssetsShouldBeEqualToBalanceAfterSMEAR() public {
vm.assume(asset.balanceOf(address(esr)) <= type(uint168).max);
if (asset.balanceOf(address(esr)) == 0) return;
esr.gulp();
skip(esr.INTEREST_SMEAR()); // make sure smear has passed
assertEq(esr.totalAssets(), asset.balanceOf(address(esr)));
Expand Down

0 comments on commit 663b9f5

Please sign in to comment.