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 |