-
Notifications
You must be signed in to change notification settings - Fork 324
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
"InvariantTest" does not have a "vm" #282
Comments
You would inherit from both, e.g. |
I think since invariants are a subset of overall testing it makes sense to do Comes down to compilation time vs. ease of use I guess. What do you think is best here @mds1? |
Works for me.
Compilation times should not be a concern in this case - compiling a dozen or so functions should be a super quick task on modern computers. |
Another benefit of merging That is, invariant tests would no longer be considered something qualitatively different from fuzz tests - which makes sense, since inputs are fuzzed in invariants tests, too. |
Let's do |
I'm good with that. This would be a breaking change, so we'll release a v1.4.0 after? |
SGTM. |
Shouldn't the invariant testing utilities follow the same pattern as everything else? i.e. have the file Very much in favor of keeping |
Yea this is what I was planning to do actually, will open a PR for it sometime this week |
PR for this is ready here if anyone can give a quick review 🙂 |
No cheatcodes can currently be used in a test contract that inherits just from
InvariantTest
.I don't know if this is intended - but if it is, we should definitely mention what's the recommend way of adding the
vm
(in foundry-rs/book#760), e.g. inherit fromTest
, orTestBase
, define avm
yourself, etc.The text was updated successfully, but these errors were encountered: