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

Unified Diff: client/testing/unittest/shared.dart

Issue 9365023: add string-equals to unittest, fix implementation in expect.dart (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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 | corelib/src/expect.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: client/testing/unittest/shared.dart
diff --git a/client/testing/unittest/shared.dart b/client/testing/unittest/shared.dart
index c6faa4aec568a3a12b4015a75b5c607077e22458..06e08392385a16207e513c516e0aa00ee9bf3abc 100644
--- a/client/testing/unittest/shared.dart
+++ b/client/testing/unittest/shared.dart
@@ -308,6 +308,14 @@ class Expectation {
void equalsSet(Iterable expected) {
Expect.setEquals(expected, _value);
}
+
+ /**
+ * Asserts that value is equivalent to [expected], assuming both are strings.
+ * When the strings differ, the error highlights the diff between them.
+ */
+ void equalsString(String expected) {
Bob Nystrom 2012/02/08 19:17:43 Why don't we just make the regular equals() handle
Siggi Cherem (dart-lang) 2012/02/08 19:23:51 Done. I thought that the error message of stringEq
+ Expect.stringEquals(expected, _value);
+ }
}
/** Summarizes information about a single test case. */
« no previous file with comments | « no previous file | corelib/src/expect.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698