Skip to content

Add a top level equals utility - #1897

Closed
natebosch wants to merge 3 commits into
masterfrom
top-level-equals
Closed

Add a top level equals utility#1897
natebosch wants to merge 3 commits into
masterfrom
top-level-equals

Conversation

@natebosch

Copy link
Copy Markdown
Member

As a shortcut for the very common it()..equals pattern. Any other
condition will still need to fall back on it()...

As a shortcut for the very common `it()..equals` pattern. Any other
condition will still need to fall back on `it()..`.
This demonstrates a risk of this method - if other packages add an
extension which specialized `equals` for other Subject types, they won't
get picked up by `equals()` but would get picked up by `it()..equals()`.
@natebosch

Copy link
Copy Markdown
Member Author

If we consider adding something like this after landing #2697 it would be something like Condition.equals<T>(T) with dot shorthand .equals(t).

@natebosch natebosch closed this Jul 18, 2026
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