Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: lib/src/map_matchers.dart

Issue 840133003: matcher: fixed status file, formatting, tweaks to readme (Closed) Base URL: https://github.com/dart-lang/matcher.git@master
Patch Set: Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/src/map_matchers.dart
diff --git a/lib/src/map_matchers.dart b/lib/src/map_matchers.dart
index 623b380ec24c8555880f0a2d03caff2ee4e46410..8facbf558b4a75520f34a14e064e7e4dcbde33a5 100644
--- a/lib/src/map_matchers.dart
+++ b/lib/src/map_matchers.dart
@@ -32,24 +32,29 @@ class _ContainsMapping extends Matcher {
const _ContainsMapping(this._key, Matcher this._valueMatcher);
bool matches(item, Map matchState) =>
- item.containsKey(_key) &&
- _valueMatcher.matches(item[_key], matchState);
+ item.containsKey(_key) && _valueMatcher.matches(item[_key], matchState);
Description describe(Description description) {
- return description.add('contains pair ').addDescriptionOf(_key).
- add(' => ').addDescriptionOf(_valueMatcher);
+ return description
+ .add('contains pair ')
+ .addDescriptionOf(_key)
+ .add(' => ')
+ .addDescriptionOf(_valueMatcher);
}
- Description describeMismatch(item, Description mismatchDescription,
- Map matchState, bool verbose) {
+ Description describeMismatch(
+ item, Description mismatchDescription, Map matchState, bool verbose) {
if (!item.containsKey(_key)) {
- return mismatchDescription.add(" doesn't contain key ")
+ return mismatchDescription
+ .add(" doesn't contain key ")
.addDescriptionOf(_key);
} else {
- mismatchDescription.add(' contains key ').addDescriptionOf(_key).
- add(' but with value ');
- _valueMatcher.describeMismatch(item[_key], mismatchDescription,
- matchState, verbose);
+ mismatchDescription
+ .add(' contains key ')
+ .addDescriptionOf(_key)
+ .add(' but with value ');
+ _valueMatcher.describeMismatch(
+ item[_key], mismatchDescription, matchState, verbose);
return mismatchDescription;
}
}

Powered by Google App Engine
This is Rietveld 408576698