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

Unified Diff: tests/utils/unittest_test.dart

Issue 10548005: Add matchers for unit testing futures: (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
« lib/unittest/future_matchers.dart ('K') | « lib/unittest/unittest.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/utils/unittest_test.dart
diff --git a/tests/utils/unittest_test.dart b/tests/utils/unittest_test.dart
index 74d8b2d455675899e87bc230774c743261dfb0ab..cb8b70d31d87439f561bef2ffbfe53ca31d27eff 100644
--- a/tests/utils/unittest_test.dart
+++ b/tests/utils/unittest_test.dart
@@ -28,10 +28,11 @@ void shouldFail(var value, Matcher matcher, expected) {
expect(value, matcher);
configureExpectHandler(null);
expect(errorCount, equals(1));
- if (expected is String)
+ if (expected is String) {
expect(errorString, equalsIgnoringWhitespace(expected));
- else
- expect(errorString, expected);
+ } else {
+ expect(errorString, expected);
+ }
}
void shouldPass(var value, Matcher matcher) {
« lib/unittest/future_matchers.dart ('K') | « lib/unittest/unittest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698