Fix Foundry test generation contract name collision#1484
Fix Foundry test generation contract name collision#1484gustavo-grieco merged 3 commits intocrytic:masterfrom
Conversation
|
This looks good, but I would like to have the test for this feature to actually call foundry with a minimal example and verify it compiles correctly. While it is a trivial to know that it works here, this test functionality will be useful for future PRs (there are a couple of foundry issues that also will need a unit test). |
8b5f37f to
afc3de0
Compare
afc3de0 to
06bd48f
Compare
|
@gustavo-grieco Updated the test so it runs |
|
@gustavo-grieco Anything left to be covered in this PR? |
|
I think this one looks good, but it will be merged after the release of 2.3 (which can be as close as next week). I'm very interested to develop this test code into a full test of the foundry unit-test capabilities (e.g. breaking an invariant, generating the foundry test and then run |
|
@gustavo-grieco Thanks for the update and looking forward to 2.3! 🚀
Sure! Also, two more Foundry test generation fixes that I'm planning to resolve are left (#1465). |
* Fix Foundry test generation contract name collision * Add actual forge compilation test in Foundry test generation suite * Install foundry in CI
This PR changes generated Foundry tests contract name from "Test" to "FoundryTest" to avoid identifier collision with the
forge-std/Test.solbase class. The previous outputcontract Test is Testcaused a Solidity compilation error.Part of #1465 report.