Skip to content

Commit

Permalink
test: uncomment invariant test
Browse files Browse the repository at this point in the history
  • Loading branch information
TanyaRoze committed May 23, 2024
1 parent f6fd0ee commit 57a198e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/unit/esr/ESR.Fuzz.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ contract ESRFuzzTest is ESRTest {
assertGe(esrSlot.interestLeft, accruedInterest);
}

// totalAssets should be equal to the balance after SMEAR has passed
// function invariant_totalAssetsShouldBeEqualToBalanceAfterSMEAR() public {
// vm.assume(asset.balanceOf(address(esr)) <= type(uint168).max);
// esr.gulp();
// skip(esr.INTEREST_SMEAR()); // make sure smear has passed
// assertEq(esr.totalAssets(), asset.balanceOf(address(esr)));
// }
//totalAssets should be equal to the balance after SMEAR has passed
function invariant_totalAssetsShouldBeEqualToBalanceAfterSMEAR() public {
vm.assume(asset.balanceOf(address(esr)) <= type(uint168).max);
esr.gulp();
skip(esr.INTEREST_SMEAR()); // make sure smear has passed
assertEq(esr.totalAssets(), asset.balanceOf(address(esr)));
}

function testFuzz_interestAccrued_under_uint168(uint256 interestAmount, uint256 depositAmount, uint256 timePassed)
public
Expand Down

0 comments on commit 57a198e

Please sign in to comment.