Fix Foundry test generation contract name collision
This PR changes generated Foundry tests contract name from "Test" to "FoundryTest" to avoid identifier collision with the forge-std/Test.sol base class. The previous output contract Test is Test caused a Solidity compilation error.
Part of #1465 report.
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).
@gustavo-grieco Updated the test so it runs forge init. This required adding a Foundry installation step in CI.
@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 forge test to check that the test can be reproduced. Are you interested in keep expanding this in a future PR?
@gustavo-grieco Thanks for the update and looking forward to 2.3! 🚀
Are you interested in keep expanding this in a future PR?
Sure! Also, two more Foundry test generation fixes that I'm planning to resolve are left (#1465).