Closed SyedAsadKazmi closed 4 months ago
In the latest foundry version, using assert in invariant tests is getting reverted with:
assert
[FAIL. Reason: failed to set up invariant testing environment: panic: assertion failed (0x01)]
So, the solution would be to replace assert with either assertEq, assertGe or assertLe depending on the type of comparison while defining invariants.
assertEq
assertGe
assertLe
In the latest foundry version, using
assert
in invariant tests is getting reverted with:So, the solution would be to replace
assert
with eitherassertEq
,assertGe
orassertLe
depending on the type of comparison while defining invariants.