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

Unified Diff: tests/language/function_type/test_generator.dart

Issue 2879153005: Add support to dart2js for option --enable-asserts. (Closed)
Patch Set: Added !$checked to section predicate in co19 status file 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
« no previous file with comments | « tests/language/function_type/function_type9_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/language/function_type/test_generator.dart
diff --git a/tests/language/function_type/test_generator.dart b/tests/language/function_type/test_generator.dart
index dfdb8b39cca6765e5fb69c04e85a5b37fc562404..1a9360c1a1727e99caaeafb945485bd59cdfd853 100644
--- a/tests/language/function_type/test_generator.dart
+++ b/tests/language/function_type/test_generator.dart
@@ -541,9 +541,6 @@ import 'package:expect/expect.dart';
@NoInline()
@AssumeDynamic()
confuse(f) => f;
-
-final bool inCheckedMode =
- (() { bool result = false; assert(result = true); return result; })();
""";
class Unit {
@@ -642,7 +639,7 @@ final TYPEDEF_T_TESTS_TEMPLATE = """
Expect.equals(tIsDynamic, #methodFunName is #typeName<bool>);
Expect.equals(tIsDynamic, confuse(#methodFunName) is #typeName<bool>);
} else {
- if (inCheckedMode) {
+ if (typeAssertionsEnabled) {
Expect.throws(() { #fieldName = (#staticFunName as dynamic); });
Expect.throws(() { #fieldName = confuse(#staticFunName); });
#typeCode #localName;
« no previous file with comments | « tests/language/function_type/function_type9_test.dart ('k') | tests/language/language_dart2js.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698