From 57a198ec98a55e40ee0754d3281c445816032456 Mon Sep 17 00:00:00 2001 From: TanyaRoze Date: Thu, 23 May 2024 16:26:25 +0300 Subject: [PATCH] test: uncomment invariant test --- test/unit/esr/ESR.Fuzz.t.sol | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/test/unit/esr/ESR.Fuzz.t.sol b/test/unit/esr/ESR.Fuzz.t.sol index 9b3e363f..b98cd5de 100644 --- a/test/unit/esr/ESR.Fuzz.t.sol +++ b/test/unit/esr/ESR.Fuzz.t.sol @@ -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