Skip to content
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

fail_on_revert stateful fuzzing (invariant) tests should have an override #4636

Closed
PatrickAlphaC opened this issue Mar 24, 2023 · 3 comments
Closed
Labels
A-config Area: config C-forge Command: forge Cmd-forge-test Command: forge test T-feature Type: feature

Comments

@PatrickAlphaC
Copy link

Component

Forge

Describe the feature you would like

When I'm writing invariant tests, in our foundry.toml you have the option to have fail_on_revert be true or false.

I'd love to see like a decorator or something like such:

vm.fail_on_revert(false);
function invariant_testSomething() public {
// code
}

Or something.

Additional context

No response

@PatrickAlphaC PatrickAlphaC added the T-feature Type: feature label Mar 24, 2023
@gakonst gakonst added this to Foundry Mar 24, 2023
@github-project-automation github-project-automation bot moved this to Todo in Foundry Mar 24, 2023
@mds1
Copy link
Collaborator

mds1 commented Mar 24, 2023

I think this is a subset of #3062, which tries to figure out a UX for changing all fuzz/invariant configs on e.g. a per-test basis. Would love to get your thoughts on that proposal! Just added a comment to the end (#3062 (comment)) with some more recent thoughts on how to structure the UX

@mds1 mds1 added Cmd-forge-test Command: forge test C-forge Command: forge A-config Area: config labels Mar 24, 2023
@grandizzy
Copy link
Collaborator

that's possible with inline /// forge-config: default.invariant.fail-on-revert = true @mds1 I think this one can be closed?

@mds1
Copy link
Collaborator

mds1 commented Apr 26, 2024

Agreed with that, thanks!

@mds1 mds1 closed this as completed Apr 26, 2024
@jenpaff jenpaff moved this from Todo to Completed in Foundry Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-config Area: config C-forge Command: forge Cmd-forge-test Command: forge test T-feature Type: feature
Projects
Archived in project
Development

No branches or pull requests

3 participants