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

Unified Diff: tests/corelib/iterable_generate_test.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/corelib/int_parse_radix_test.dart ('k') | tests/corelib/list_removeat_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/iterable_generate_test.dart
diff --git a/tests/corelib/iterable_generate_test.dart b/tests/corelib/iterable_generate_test.dart
index 958f56063d8cb6de3fef17cbbbbecead6d379318..4c2a9d58aa736104af0ba387dd4a3642c9219875 100644
--- a/tests/corelib/iterable_generate_test.dart
+++ b/tests/corelib/iterable_generate_test.dart
@@ -5,8 +5,6 @@
import "package:expect/expect.dart";
main() {
- bool checkedMode = false;
- assert((checkedMode = true));
void test(expectedList, generatedIterable) {
Expect.equals(expectedList.length, generatedIterable.length);
Expect.listEquals(expectedList, generatedIterable.toList());
@@ -39,7 +37,7 @@ main() {
Expect.isFalse(st.iterator is Iterator<int>);
test(["0", "1", "2", "3", "4"], st);
- if (checkedMode) {
+ if (typeAssertionsEnabled) {
Expect.throws(() => new Iterable<String>.generate(5));
}
@@ -59,8 +57,8 @@ main() {
// Invalid types:
Expect.throws(() => new Iterable<String>.generate(5));
- if (checkedMode) { // //# 01: ok
- Expect.throws(() => new Iterable<Null>.generate(5).elementAt(2)); //# 01: continued
+ if (typeAssertionsEnabled) { // //# 01: ok
+ Expect.throws(() => new Iterable<Null>.generate(5).elementAt(2)); //# 01: continued
} else { // //# 01: continued
Iterable<dynamic> iter5 = new Iterable<Null>.generate(5); // //# 01: continued
Expect.equals(2, iter5.elementAt(2)); // //# 01: continued
« no previous file with comments | « tests/corelib/int_parse_radix_test.dart ('k') | tests/corelib/list_removeat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698