Extract remaining crowded compiler tests (Phase 3)#42
Merged
Conversation
Files where inline tests crowded out production code (test/prod ratio ≥ 0.8) move to sibling files via `#[path]`. Files where production dominates (query_input.rs, schema_plan.rs) stay inline — extracting would add noise, not reduce it. - ir/lower.rs: 1239 → 577 lines (ratio 1.15) - catalog/mod.rs: 594 → 326 lines (ratio 0.83) - query/lint.rs: 562 → 314 lines (ratio 0.80) catalog/tests.rs uses the shorter name since it's inside a module directory (no ambiguity with filename). All 229 compiler tests green, identical count to before. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 3 of the test refactor. Extends the
#[path]sibling pattern from PR #41 to the remaining compiler files where inline tests crowded out production code. Cutoff: test/prod ratio ≥ 0.8. Files where production dominates stay inline — extracting them would add noise without reducing it.ir/lower.rscatalog/mod.rsquery/lint.rsquery_input.rsschema_plan.rscatalog/tests.rsuses the shorter name since it lives inside a module directory — no ambiguity with a filename-derived sibling (likelower_tests.rsnext tolower.rs).Test plan
cargo test -p omnigraph-compiler— 229 tests green, identical count to beforeuse super::*;, only mechanical 4-space de-indent🤖 Generated with Claude Code