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

Unified Diff: tests/language_strong/assert_with_message_test.dart

Issue 2971243003: fix #30094, assert should work with a function (Closed)
Patch Set: fix Created 3 years, 5 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: tests/language_strong/assert_with_message_test.dart
diff --git a/tests/language_strong/assert_with_message_test.dart b/tests/language_strong/assert_with_message_test.dart
index 878bd712627091f9300f30579c70df4939992358..147ee2fb6e6da13a8fe69a7501eed81ccb1b1ce4 100644
--- a/tests/language_strong/assert_with_message_test.dart
+++ b/tests/language_strong/assert_with_message_test.dart
@@ -52,7 +52,7 @@ testNullMessage() {
assert(false, null);
Expect.fail("Assert should throw.");
} catch (e) {
- Expect.isTrue(e.toString().contains("null"));
+ Expect.isTrue(e.toString().contains("is not true"));
Jennifer Messerly 2017/07/07 23:43:17 this test now matches VM behavior
}
}
@@ -82,7 +82,7 @@ testCallsToStringOnMessageLazily() {
Expect.fail("Assert should throw.");
} catch (e) {
Expect.isFalse(toString.calledToString);
- Expect.isTrue(e.toString().contains("toString!"));
- Expect.isTrue(toString.calledToString);
+ Expect.isTrue(e.toString().contains("Instance of 'ToString'"));
Jennifer Messerly 2017/07/07 23:43:17 same here
+ Expect.isFalse(toString.calledToString);
}
}

Powered by Google App Engine
This is Rietveld 408576698