Skip to content

Tighten method reference test helper#696

Merged
alexcrocha merged 1 commit intomainfrom
03-25-tighten_method_reference_test_assertions
Mar 26, 2026
Merged

Tighten method reference test helper#696
alexcrocha merged 1 commit intomainfrom
03-25-tighten_method_reference_test_assertions

Conversation

@alexcrocha
Copy link
Copy Markdown
Contributor

@alexcrocha alexcrocha commented Mar 26, 2026

This follows up on post-merge feedback from #662

assert_method_ref_receiver! now fails with a descriptive panic when a matched method reference has no receiver, and it requires exactly one method reference for the asserted name so tests cannot silently validate the wrong match. The macro documentation was also updated to reflect that uniqueness requirement.

Make assert_method_ref_receiver! fail loudly when a method reference is
missing a receiver or when multiple references share the same name, so
receiver tests can't silently validate the wrong match
Copy link
Copy Markdown
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@alexcrocha alexcrocha changed the title Tighten method reference test assertions Tighten method reference test helper Mar 26, 2026
@alexcrocha alexcrocha marked this pull request as ready for review March 26, 2026 04:26
@alexcrocha alexcrocha requested a review from a team as a code owner March 26, 2026 04:26
@alexcrocha alexcrocha self-assigned this Mar 26, 2026
@alexcrocha alexcrocha merged commit d469410 into main Mar 26, 2026
31 checks passed
@alexcrocha alexcrocha deleted the 03-25-tighten_method_reference_test_assertions branch March 26, 2026 15:15
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.

2 participants