Skip to content

Fix foundry test generation linter hints and tests#1522

Merged
gustavo-grieco merged 7 commits intocrytic:dev-improve-foundry-supportfrom
BowTiedRadone:fix/foundry-test-gen-build
Jan 31, 2026
Merged

Fix foundry test generation linter hints and tests#1522
gustavo-grieco merged 7 commits intocrytic:dev-improve-foundry-supportfrom
BowTiedRadone:fix/foundry-test-gen-build

Conversation

@BowTiedRadone
Copy link
Copy Markdown
Contributor

No description provided.

All the tests were displaying the same label on success because they are using
the same Solidity file.

// Invariant that can be violated when counter > 100
function invariant_counter_below_limit() public view {
assertTrue(counter <= 100);
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use 5 instead of 100, so we can detect this faster. We don't need something very complex.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in 146cf6c.

@gustavo-grieco gustavo-grieco merged commit c3685e7 into crytic:dev-improve-foundry-support Jan 31, 2026
1 check passed
@BowTiedRadone BowTiedRadone deleted the fix/foundry-test-gen-build branch March 2, 2026 17:28
gustavo-grieco added a commit that referenced this pull request Mar 13, 2026
* improved support for foundry tests

* Extend Foundry support testing (#1512)

* Fix lint failures

* ci: bump python version to 3.10, clone submodules

* some fixes when using foundry mode

* Update hevm to `542986dea3bec4f5898731ff48877a7a21811bf4`

* Fix bugs in Foundry test generation (#1516)

* Fix fallback function bug in Foundry test generation

* Fix null byte in argument bug in Foundry test generation

* Remove unnecessary config file

* Remove unused/redundant imports

* Disable Slither in Foundry test gen tests

* Conditionally run forge-std tests based on the solc version

* Reduce unnecessary test grouping and improve failed assertion messages

---------

Co-authored-by: Emilio López <[email protected]>

* Update hevm to `41e6d1304411749ea8c816d131991663b5dca67a`

* Fix linter and build errors (#1521)

* improve foundry stateful invariant testing

* fix

* Fix foundry test generation linter hints and tests (#1522)

* Foundry updates (#1525)

* Rename dapptest to foundry and support foundry assertX in assertion mode

* Rename basic foundry test contracts dir to `foundry-basic`

* Add testing modes to `README`

* fixes

* fixes

* Add support for Foundry assume (#1528)

* flake: sync hevm version with stack.yaml

* Clarify `optimization` test mode in `README` (#1529)

* IS_TEST fix

---------

Co-authored-by: Radu Bahmata <[email protected]>
Co-authored-by: Emilio López <[email protected]>
Co-authored-by: Emilio López <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants