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

Unified Diff: tests/language/function_type/function_type11_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/function_type/function_type11_test.dart
diff --git a/tests/language/function_type/function_type11_test.dart b/tests/language/function_type/function_type11_test.dart
index 6b79d3d1cc4161561bcabce718730e0fc62e5e53..3afbf5bd758b106f0fd9b3b1d5a7275182318459 100644
--- a/tests/language/function_type/function_type11_test.dart
+++ b/tests/language/function_type/function_type11_test.dart
@@ -19,9 +19,15 @@ import 'package:expect/expect.dart';
@AssumeDynamic()
confuse(f) => f;
-final bool inCheckedMode =
- (() { bool result = false; assert(result = true); return result; })();
-
+final bool inCheckedMode = (() {
+ try {
+ var i = 42;
+ String s = i;
+ } on TypeError catch (e) {
+ return true;
+ }
+ return false;
+})();
typedef F0<T> = int Function(Function x);
typedef F1<T> = Function Function();

Powered by Google App Engine
This is Rietveld 408576698