Skip to content
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

Add matcher "orderedEqualsItemsCloseTo" #8670

Closed
DartBot opened this issue Feb 21, 2013 · 4 comments
Closed

Add matcher "orderedEqualsItemsCloseTo" #8670

DartBot opened this issue Feb 21, 2013 · 4 comments
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. type-enhancement A request for a change that isn't a bug

Comments

@DartBot
Copy link

DartBot commented Feb 21, 2013

This issue was originally filed by @Bluenuance


it would be nice to have a matcher which checks if the lists are the same length and checks each item to be closeTo(v, delta)
so it is easily possible to check two List<double> from some calculation as they will most of the time NOT be equals

@anders-sandholm
Copy link
Contributor

Removed Type-Defect label.
Added Type-Enhancement, Area-Library, Triaged labels.

@gramster
Copy link
Contributor

I'm not sure this is a common use case. You can create your own Matcher by extending CustomMatcher. Using closeTo is not useful here because v is a constant and you want a pairwise comparison, so to use closeTo you would have to make this matcher very specific:

expect(actual, pairwiseCloseTo(expected))

or:

expect(actual, pairwiseDifference(expected, closeTo(0, delta)))

@kevmoo
Copy link
Member

kevmoo commented May 9, 2014

Added Pkg-matcher label.

@DartBot DartBot added Type-Enhancement area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. labels May 9, 2014
@DartBot
Copy link
Author

DartBot commented Jun 5, 2015

This issue has been moved to dart-lang/matcher#12.

@DartBot DartBot closed this as completed Jun 5, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-core-library SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries. type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

No branches or pull requests

4 participants