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

Unified Diff: tests/corelib/list_removeat_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/iterable_generate_test.dart ('k') | tests/corelib/splay_tree_from_iterable_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/list_removeat_test.dart
diff --git a/tests/corelib/list_removeat_test.dart b/tests/corelib/list_removeat_test.dart
index 758e9204dffd2f0721cfd0daa417ad1f89f77636..43bf2eb3ce30b9d5c586db1ae9e8a1865ec8c53b 100644
--- a/tests/corelib/list_removeat_test.dart
+++ b/tests/corelib/list_removeat_test.dart
@@ -22,9 +22,6 @@ class MyList extends ListBase {
// l1 must be a modifiable list with 5 elements from 0 to 4.
void testModifiableList(l1) {
- bool checkedMode = false;
- assert(checkedMode = true);
-
// Index must be integer and in range.
Expect.throws(() {
l1.removeAt(-1);
@@ -37,10 +34,12 @@ void testModifiableList(l1) {
}, (e) => e is ArgumentError, "too large");
Expect.throws(() {
l1.removeAt("1");
- }, (e) => (checkedMode ? e is TypeError : e is ArgumentError), "string");
+ }, (e) => (typeAssertionsEnabled ? e is TypeError : e is ArgumentError),
+ "string");
Expect.throws(() {
l1.removeAt(1.5);
- }, (e) => (checkedMode ? e is TypeError : e is ArgumentError), "double");
+ }, (e) => (typeAssertionsEnabled ? e is TypeError : e is ArgumentError),
+ "double");
Expect.equals(2, l1.removeAt(2), "l1-remove2");
Expect.equals(1, l1[1], "l1-1[1]");
« no previous file with comments | « tests/corelib/iterable_generate_test.dart ('k') | tests/corelib/splay_tree_from_iterable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698