-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tests pass with failed assertion in external call #1149
Comments
This is not a bug - You should:
I don't think iterating over all members of the test contract to check
I also don't think this is how DappTools behaves |
related: dapphub/dapptools#768 |
Interesting solution, addresses my concerns! Thanks for sharing. I imagine this would require support in https://github.com/dapphub/ds-test/, though? |
Yeah we could have a specific address / storage slot which we treat as the global? |
implementing a fix upstream that should fix this |
Fixed upstream :) |
Component
Forge
Have you ensured that all of these are up to date?
What version of Foundry are you on?
forge 0.2.0 (09d53c2 2022-03-31T00:32:45.902442+00:00)
What command(s) is the bug in?
forge test
Operating System
macOS (M1)
Describe the bug
Tests are passing even though assertion fails
How to reproduce
Run
forge test -vv
with the following test contract:Expected Result
Both tests should fail
Actual Result
Only the test where the assertion fails in an internal call fails. Test where assertion fails in external call passes.
Severity
This is likely a high sev bug. Code bases with complex tests are likely to refactor their testing into multiple contracts. This bug can cause tests to fail silently.
The text was updated successfully, but these errors were encountered: