test: one contract per file (satisfy rainix single-contract gate)#537
test: one contract per file (satisfy rainix single-contract gate)#537thedavidmeister wants to merge 4 commits into
Conversation
Split each test .sol that declared more than one contract so every file declares exactly one. The primary test contract stays in the original file; each helper/mock/secondary contract moves to its own file named after the contract, with the SPDX header, pragma, and imports it needs. Each original file imports the contracts it still references. Pure file reorganization: no test logic or contract behavior changes. Satisfies the rainix rainix-sol-single-contract gate (rainix #214), greening main and unblocking coverage PRs #534 and #536. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Warning Review limit reached
Next review available in: 49 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (36)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🤖 ai:producer |
|
🤖 ai:vetter |
The rainix
rainix-sol-single-contractgate (rainix #214) enforces the Rain convention of onecontract/abstract contractper.solfile. 14 pre-existing test files declared more than one contract, which fails the gate and redsmain.This PR splits each offending file so every
.soldeclares exactly one contract. The primary test contract stays in the original file named after it; each helper / mock / secondary contract moves into its own file named after the contract, carrying the SPDX header, pragma, and the imports it needs. Each original file imports the contracts it still references. This is a pure file reorganization: no test logic or contract behavior changed.Files split (original -> moved contracts in their own new files)
test/src/abstract/BaseRainlangExtern.construction.t.sol(5) ->TestableExtern.sol,EmptyPointersExtern.sol,MismatchedExternMoreOpcodes.sol,MismatchedExternMoreIntegrity.soltest/src/abstract/BaseRainlangExtern.ierc165.t.sol(2) ->ChildRainlangExtern.soltest/src/abstract/BaseRainlangExtern.integrityOpcodeRange.t.sol(2) ->TwoOpExtern.soltest/src/abstract/BaseRainlangSubParser.ierc165.t.sol(2) ->ChildRainlangSubParser.soltest/src/abstract/BaseRainlangSubParser.subParseLiteral2.t.sol(4) ->HappyPathLiteralSubParser.sol,NoMatchLiteralSubParser.sol,MismatchedLiteralSubParser.soltest/src/abstract/BaseRainlangSubParser.subParseWord2.t.sol(3) ->MismatchedWordSubParser.sol,EmptyWordParsersSubParser.soltest/src/concrete/RainlangInterpreter.zeroFunctionPointers.t.sol(2) ->ZeroFPRainlangInterpreter.soltest/src/concrete/RainlangParser.parseMemoryOverflow.t.sol(2) ->ModifierTestParser.soltest/src/concrete/RainlangReferenceExtern.subParserIndexOutOfBounds.t.sol(2) ->MockExternBadLiteralIndex.soltest/src/lib/integrity/LibIntegrityCheck.t.sol(3) ->IntegritySingleOp.sol,IntegrityHighwater.soltest/src/lib/parse/LibSubParse.badSubParserResult.t.sol(2) ->BadLengthSubParser.soltest/src/lib/parse/LibSubParse.constantAccumulation.t.sol(3) ->ConstantReturningSubParser.sol,MultiConstantSubParser.soltest/src/lib/parse/LibSubParse.subParseWords.t.sol(2) ->ContextReturningSubParser.soltest/src/lib/state/LibInterpreterStateDataContract.t.sol(2) ->LibInterpreterStateDataContractExtern.sol14 files split into 22 new single-contract files; contract count is conserved (36 contracts before and after).
Verification
rainix-sol-single-contractexits 0 (no violations remain).forge buildclean;forge fmt --checkclean.forge test: 1524 passed. The only 16 failures are pre-existing fork tests that need RPC env vars (ARBITRUM_RPC_URL,BASE_RPC_URL, etc.) not set in the local sandbox; they fail identically on cleanmainand are in files this PR does not touch.Greens
mainand unblocks coverage PRs #534 and #536.🤖 Generated with Claude Code