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

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

Issue 16408019: Improved error messages from unittest. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 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/basematcher.dart
===================================================================
--- pkg/unittest/lib/src/basematcher.dart (revision 23884)
+++ pkg/unittest/lib/src/basematcher.dart (working copy)
@@ -50,8 +50,11 @@
* It does not check whether the [item] fails the match, as it is
* only called after a failed match. There may be additional info
* about the mismatch in [matchState].
+ * The base matcher does not add anything as the actual value is
+ * typically sufficient, but matchers that can add valuable info
+ * should override this.
*/
Description describeMismatch(item, Description mismatchDescription,
MatchState matchState, bool verbose) =>
- mismatchDescription.add('was ').addDescriptionOf(item);
+ mismatchDescription;
}

Powered by Google App Engine
This is Rietveld 408576698