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

Unified Diff: pkg/unittest/lib/src/iterable_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/iterable_matchers.dart
diff --git a/pkg/unittest/lib/src/iterable_matchers.dart b/pkg/unittest/lib/src/iterable_matchers.dart
index acf41d0552a0687eb43dc392fa582e8b7f98db0e..65bc61089bb65a982d9635829ffd31e185d4b8e9 100644
--- a/pkg/unittest/lib/src/iterable_matchers.dart
+++ b/pkg/unittest/lib/src/iterable_matchers.dart
@@ -42,8 +42,9 @@ class _EveryElement extends _IterableMatcher {
if (matchState.state != null) {
var index = matchState.state['index'];
var element = matchState.state['element'];
+ mismatchDescription.add('position $index ');
return _matcher.describeMismatch(element, mismatchDescription,
- matchState.state['state'], verbose).add(' at position $index');
+ matchState.state['state'], verbose);
}
return super.describeMismatch(item, mismatchDescription,
matchState, verbose);

Powered by Google App Engine
This is Rietveld 408576698