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

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

Issue 12207123: Improve matcher descriptions that match against objects, and thus fix a bug (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 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
« no previous file with comments | « no previous file | pkg/unittest/test/mock_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/unittest/lib/src/description.dart
===================================================================
--- pkg/unittest/lib/src/description.dart (revision 18358)
+++ pkg/unittest/lib/src/description.dart (working copy)
@@ -47,6 +47,12 @@
String description = (value == null) ? "null" : value.toString();
if (description.startsWith('<') && description.endsWith('>')) {
add(description);
+ } else if (description.startsWith("Instance of")) {
+ add('<');
+ add(description);
+ add(':');
+ add(value.hashCode.toString());
+ add('>');
} else {
add('<');
add(description);
« no previous file with comments | « no previous file | pkg/unittest/test/mock_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698