Skip to content

Migrate conditional and operator tests from Rust to Ruby integration tests#69

Merged
dak2 merged 1 commit intomainfrom
migrate-conditionals-operators-tests-to-ruby
Mar 20, 2026
Merged

Migrate conditional and operator tests from Rust to Ruby integration tests#69
dak2 merged 1 commit intomainfrom
migrate-conditionals-operators-tests-to-ruby

Conversation

@dak2
Copy link
Copy Markdown
Owner

@dak2 dak2 commented Mar 20, 2026

Motivation

These Rust tests were full-pipeline integration tests (parse → install → propagate → type check) that verify the same type inference results already covered by conditional_test.rb and operator_test.rb. Rust tests should focus on internal state verification (scope management, variable binding, edge propagation) that cannot be tested end-to-end, while Ruby integration tests cover type inference outcomes.

Changes

  • Remove all 14 redundant Rust tests from conditionals.rs and all 9 from operators.rs
  • Add 3 UNIQUE test scenarios to Ruby side before deletion:
    • test_nested_conditionals_union_type (conditional_test.rb)
    • test_nested_logical_operators_union_type (operator_test.rb)
    • test_not_nil_returns_boolean (operator_test.rb)
  • Net: -553 lines / +43 lines (test code only, no production code changes)

Checked

  • cd core && cargo test --lib — 292 passed
  • bundle exec rake test — 240 passed, 0 failures

🤖 Generated with Claude Code

…tests

All 14 conditional tests and all 9 operator tests in Rust were full-pipeline
integration tests (parse → install → propagate → type check) that duplicate
coverage already provided by Ruby integration tests in conditional_test.rb
and operator_test.rb.

Remove these redundant Rust tests and add 3 UNIQUE scenarios that previously
existed only in Rust:
- nested conditionals union type (conditional_test.rb)
- nested logical operators union type (operator_test.rb)
- !nil returns boolean (operator_test.rb)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dak2 dak2 force-pushed the migrate-conditionals-operators-tests-to-ruby branch from 28d7fb2 to 77460f2 Compare March 20, 2026 08:37
@dak2 dak2 merged commit 25ded29 into main Mar 20, 2026
4 checks passed
@dak2 dak2 deleted the migrate-conditionals-operators-tests-to-ruby branch March 20, 2026 08:44
@dak2 dak2 mentioned this pull request Mar 24, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant