-
Notifications
You must be signed in to change notification settings - Fork 642
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sortedWith
(and related) matchers.
#383
Conversation
…plifies code in some places, adds "..." suffix when list gets truncated in others).
…orted with given ordering.
Awesome! but can I ask for a couple of things before merging.
|
…onMatchers.kt' to 'collections/matchers.kt'.
The matchers were suffixed with "With" to match the convention in collections ( I also tweaked the tests, but that should be an inconsequential change (as far as this feature is concerned). |
|
If it were just one of the two suffixes, "by" would have been my choice (it's also slightly more common). However, since "by" is used for methods that take selectors, it's probably least surprising to stick with the convention established by library classes. Speaking of "by", would it be worth it to add sort matchers taking selectors? They're not necessary, as the matchers with comparators are more general, but might be of use. |
I think it's fine as it is, but if you think otherwise I'd be happy to merge another PR. |
Here are some matchers like
sorted()
(and those based on it), but that take custom orderings.The commit also includes a new test subproject to test assertions.