Conversation
…gration tests Rust analyzer tests for include/extend/attr/super were full-pipeline integration tests duplicating Ruby test coverage. Move UNIQUE scenarios to Ruby side and remove REDUNDANT Rust tests, keeping only true unit tests that verify internal state not observable via CLI. Ruby additions: - include_test.rb: MRO order for simultaneous include, class method priority - extend_test.rb: MRO order for simultaneous extend, def self.find priority - attr_test.rb: attr_writer setter-only registration - super_test.rb: explicit empty args super(), qualified superclass Rust deletions: - dispatch.rs: 46 redundant tests covering attr/include/extend/inheritance/ implicit-self/constant-read/keyword-args/safe-navigation - super_calls.rs: 6 redundant tests (2 unit tests retained) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
b679972 to
fdfa8ba
Compare
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.
Motivation
Rust analyzer tests for include/extend/attr/super were full-pipeline integration tests (
analyze()→resolve_method()→ type string comparison) that duplicated Ruby integration test coverage. This migration eliminates redundancy while ensuring all unique scenarios are preserved in the Ruby test suite.So, I moves end-to-end type inference tests to Ruby and keeps only true unit tests in Rust that verify internal state not observable via CLI.
Changes
Ruby additions (7 new tests)
include_test.rb: simultaneousinclude A, BMRO order (A has higher priority), class's own method takes priority over included moduleextend_test.rb: simultaneousextend A, BMRO order,def self.findtakes priority over extended moduleattr_test.rb:attr_writer :nameregisters setter only (no false getter)super_test.rb:super()with explicit empty args, qualified superclass (class Dog < Animals::Pet)Rust deletions (-796 lines)
dispatch.rs: removed 46 redundant tests covering attr_reader/writer, include, extend, inheritance, implicit self call, constant read, keyword args, and safe navigationsuper_calls.rs: removed 6 redundant tests (retained 2 unit tests:test_super_outside_method_ignored,test_super_without_superclass_ignored)Retained Rust unit tests
dispatch.rs: 6 tests verifying internal state (unassigned attr_reader vertex, super call independence, unknown module robustness, top-level fallback, constant read no false positive)super_calls.rs: 2 tests verifying guard conditions (super outside method, super without superclass)Checked
cd core && cargo test --lib— all tests passbundle exec rake test— all tests pass🤖 Generated with Claude Code