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

Unified Diff: tests/corelib/list_remove_range_test.dart

Issue 13956006: Remove insertRange. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebuild DOM (unrelated CL) and update status files. Created 7 years, 8 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/list_insert_range_test.dart ('k') | tests/html/element_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/list_remove_range_test.dart
diff --git a/tests/corelib/list_remove_range_test.dart b/tests/corelib/list_remove_range_test.dart
index b4fa04fc3e34b1cff09a9b47217daa8abeb6ac3b..94032a16529a1df01c61dca947d3258e059b09aa 100644
--- a/tests/corelib/list_remove_range_test.dart
+++ b/tests/corelib/list_remove_range_test.dart
@@ -28,14 +28,14 @@ main() {
Expect.listEquals([], list);
list.addAll([3, 4, 5, 6]);
- list.removeRange(2, 2);
+ list.removeRange(2, 4);
Expect.listEquals([3, 4], list);
list.addAll([5, 6]);
- expectIOORE(() { list.removeRange(4, 1); });
+ expectIOORE(() { list.removeRange(4, 5); });
Expect.listEquals([3, 4, 5, 6], list);
- list.removeRange(1, 2);
+ list.removeRange(1, 3);
Expect.listEquals([3, 6], list);
testNegativeIndices();
@@ -51,18 +51,14 @@ void testNegativeIndices() {
Expect.listEquals([1, 2], list);
// A negative length throws an ArgumentError.
- Expect.throws(() { list.removeRange(0, -1); },
- (e) => e is ArgumentError);
+ expectIOORE(() { list.removeRange(0, -1); });
Expect.listEquals([1, 2], list);
- Expect.throws(() { list.removeRange(-1, -1); },
- (e) => e is ArgumentError);
+ expectIOORE(() { list.removeRange(-1, -1); });
Expect.listEquals([1, 2], list);
- // A zero length prevails, and does not throw an exception.
- list.removeRange(-1, 0);
- Expect.listEquals([1, 2], list);
+ expectIOORE(() { list.removeRange(-1, 0); });
- list.removeRange(4, 0);
+ expectIOORE(() { list.removeRange(4, 4); });
Expect.listEquals([1, 2], list);
}
« no previous file with comments | « tests/corelib/list_insert_range_test.dart ('k') | tests/html/element_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698