Failing tests #150
Replies: 2 comments 2 replies
-
Hello @monaldmuck , your test is most likely failing because the token address you pass in to deposited on is not supported by your contract, Patrick also did run into this custom error in the course and he later wrote an handler for the fuzz testing to avoid running into errors that is it not making sense, did you already write the handler for the fuzz test like Patrick did and you are still running into this error ? |
Beta Was this translation helpful? Give feedback.
-
Hello @monaldmuck, have you managed to see which error it is exactly? You can easily use |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
at 10:42:46 when running my test I get the following:
Running 1 test for test/invariant-break/handler/Invariant.t.sol:InvariantBreakHardTest
**[FAIL. Reason: custom error 43d95d07:]
[Sequence]
sender=0x000000000000000000000000000000000000018d addr=[src/invariant-break/HandlerStatefulFuzzCatches.sol:HandlerStatefulFuzzCatches]0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f calldata=depositToken(address,uint256) args=[0xc5229DC96050d63E13841cd71CC32601B776aC53, 115792089237316195423570985008687907853269984665640564039457584007913129639932 [1.157e77]]
statefulFuzz_testInvariantBreaksHandler() (runs: 1, calls: 1, reverts: 1)
Test result: FAILED. 0 passed; 1 failed; 0 skipped; finished in 11.39ms
Ran 1 test suites: 0 tests passed, 1 failed, 0 skipped (1 total tests)
Failing tests:
Encountered 1 failing test in test/invariant-break/handler/Invariant.t.sol:InvariantBreakHardTest
[FAIL. Reason: custom error 43d95d07:]
[Sequence]
sender=0x000000000000000000000000000000000000018d addr=[src/invariant-break/HandlerStatefulFuzzCatches.sol:HandlerStatefulFuzzCatches]0x5615dEB798BB3E4dFa0139dFa1b3D433Cc23b72f calldata=depositToken(address,uint256) args=[0xc5229DC96050d63E13841cd71CC32601B776aC53, 115792089237316195423570985008687907853269984665640564039457584007913129639932 [1.157e77]]
statefulFuzz_testInvariantBreaksHandler() (runs: 1, calls: 1, reverts: 1)
Encountered a total of 1 failing tests, 0 tests succeeded**
my code looks correct but still getting error
Beta Was this translation helpful? Give feedback.
All reactions