-
Notifications
You must be signed in to change notification settings - Fork 219
Add isSorted and related matchers #2490
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
base: master
Are you sure you want to change the base?
Conversation
Requesting one of the admins to take a look at this PR. |
PR HealthChangelog Entry ✔️
Changes to files need to be accounted for in their respective changelogs. |
5f77ab9
to
e43a1d2
Compare
Updated the code to fix the failures which came up in |
This ensures that a single iteration happens. This is also how iterable_extensions.dart implements the corresponding methods. Also, rename the parameter from `comparator` to `compare` to match those functions.
…g method to `isSortedUsing`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks fine to me.
I'm not an owner of/expert on the test package, so we'll need one of those too.
This will give more information about where the actual mismatch happened.
Handle errors from keyOf and compare functions and construct the mismatch description accordingly.
@dart-lang/core-package-admins We need someone with actual test-package experience to review this too. |
Add sorting related matchers for iterables.
These match the functions available in https://github.com/dart-lang/core/blob/main/pkgs/collection/lib/src/iterable_extensions.dart