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

Unified Diff: pkg/unittest/lib/src/numeric_matchers.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/numeric_matchers.dart
===================================================================
--- pkg/unittest/lib/src/numeric_matchers.dart (revision 23884)
+++ pkg/unittest/lib/src/numeric_matchers.dart (working copy)
@@ -118,6 +118,12 @@
return description.add(_comparisonDescription);
}
}
+
+ Description describeMismatch(item, Description mismatchDescription,
+ MatchState matchState, bool verbose) {
+ mismatchDescription.add('is not ');
+ return describe(mismatchDescription);
+ }
}
/**
@@ -155,7 +161,7 @@
var diff = item - _value;
if (diff < 0) diff = -diff;
return mismatchDescription.
- add(' differed by ').
+ add(' differs by ').
addDescriptionOf(diff);
}
}

Powered by Google App Engine
This is Rietveld 408576698