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

Unified Diff: tests/language/null_bottom_test.dart

Issue 2879153005: Add support to dart2js for option --enable-asserts. (Closed)
Patch Set: Adjusted the status of two tests and the logic of one test, to make them work with --enable-asserts Created 3 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: tests/language/null_bottom_test.dart
diff --git a/tests/language/null_bottom_test.dart b/tests/language/null_bottom_test.dart
index f1288b741f29f35ea5a70d8720971c027168eadb..fb14e9f0de9573e85a1393e4fce11b5061be7bb5 100644
--- a/tests/language/null_bottom_test.dart
+++ b/tests/language/null_bottom_test.dart
@@ -7,11 +7,15 @@ import "package:expect/expect.dart";
// Test that `Null` acts like the bottom type - less than any other type.
-bool isCheckedMode = () {
- bool c = false;
- assert(c = true);
- return c;
-}();
+final bool isCheckedMode = (() {
+ try {
+ var i = 42;
+ String s = i;
+ } on TypeError catch (e) {
+ return true;
+ }
+ return false;
+})();
typedef R Fun<A, R>(A argument);

Powered by Google App Engine
This is Rietveld 408576698