matcher
matcher copied to clipboard
A declarative API for specifying expectations.
Some Matchers typecheck for specific types that they know how to handle. Currently, they return false if it is not one of the expected types. This leads to undesirable behavior....
Right now, contains works on Iterables, Strings, and Maps. For Iterables, I believe it is equivalent to the anyElement matcher. For String, I think it is equivalent to the matches...
Pre-1.0 version numbers make it look like the package is not yet ready for use.
_From @skybrian on May 27, 2016 2:31_ For example, this is not terribly readable: ``` Expected: '///\n' '// Generated code. Do not modify.\n' '///\n' 'library test;\n' '\n' 'import \'dart:async\';\n' '\n'...
This avoids issues with overloading the existing `lessThan` `greaterThan` etc matchers which rely on `==` and `
Currently Matcher.matches just returns bool, and the rest of the match result is recorded separately by mutating an untyped `Map matchState` object that must be initialized and passed in. That's...
Currently different matchers do very different things with their descriptions, up to and including just completely deleting whatever description came before them and replacing it with their own. The expectations...
--- - [x] I’ve reviewed the contributor guide and applied the relevant portions to this PR. Contribution guidelines: - See our [contributor guide](https://github.com/dart-lang/.github/blob/main/CONTRIBUTING.md) for general expectations for PRs. - Larger...
Removing dynamic calls might be difficult because of the `Matcher` API, which heavily uses `dynamic`.