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

Unified Diff: pkg/unittest/lib/src/operator_matchers.dart

Issue 14600029: Add pretty-printing to unittest and more thoroughly print values. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Code review changes. Created 7 years, 7 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: pkg/unittest/lib/src/operator_matchers.dart
diff --git a/pkg/unittest/lib/src/operator_matchers.dart b/pkg/unittest/lib/src/operator_matchers.dart
index d5142bea1a8e3e5aff251b9ea4b83c8e6b481d9f..c7421b7044a381094c2caf43b1cf86e003d71813 100644
--- a/pkg/unittest/lib/src/operator_matchers.dart
+++ b/pkg/unittest/lib/src/operator_matchers.dart
@@ -94,9 +94,9 @@ class _AllOf extends BaseMatcher {
Description describeMismatch(item, Description mismatchDescription,
MatchState matchState, bool verbose) {
var matcher = matchState.state['matcher'];
- mismatchDescription.addDescriptionOf(matcher).add(' ');
- matcher.describeMismatch(item, mismatchDescription,
- matchState.state['state'], verbose);
+ matcher.describeMismatch(item, mismatchDescription,
+ matchState.state['state'], verbose);
+ mismatchDescription.add(" (wasn't ").addDescriptionOf(matcher).add(')');
return mismatchDescription;
}

Powered by Google App Engine
This is Rietveld 408576698