Skip to content

Commit dd68592

Browse files
blagininclaude
andauthored
Refactor: Update replace_with_order_preserving_variants tests to use insta snapshots for easier updates (#17962)
* Move `test_replace_multiple_input_repartition_1` * Migrate replace_with_order_preserving_variants tests to snapshot-based testing Converted all tests in replace_with_order_preserving_variants.rs from macro-based assertions to snapshot-based testing using the insta crate. Key changes: - Replaced assert_optimized_in_all_boundedness_situations! and related macros with ReplaceTest helper struct - Used allow_duplicates! and assert_snapshot! for cleaner test assertions - Match order follows original test parameter ordering: (true, _), (false, false), (false, true) - All snapshots match the original expected plans from the macros - Removed unused imports and macros 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * refactor: replace bool test parameters with enums in replace_with_order_preserving_variants tests Replace boolean test parameters with more descriptive enums: - Add `Boundedness` enum with `Unbounded` and `Bounded` variants - Add `SortPreference` enum with `PreserveOrder` and `MaximizeParallelism` variants - Update `ReplaceTest` struct to use these enums instead of bool fields - Rename methods from `with_source_unbounded`/`with_prefer_existing_sort` to `with_boundedness`/`with_sort_preference` - Update all test functions to use enum parameters instead of bool - Update all match patterns to use enum variants This makes the tests more self-documenting and easier to understand, as the enum variant names clearly indicate what behavior is being tested. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Clippy * refactor: replace if expressions with match for boundedness checks Replace all `if boundedness == Boundedness::Unbounded` checks with cleaner match expressions. This improves code readability and makes the pattern matching more explicit and idiomatic. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> * Missing comments --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent f8ff82a commit dd68592

File tree

1 file changed

+835
-829
lines changed

1 file changed

+835
-829
lines changed

0 commit comments

Comments
 (0)