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

Unified Diff: tests/corelib/src/ListSetRangeTest.dart

Issue 8273004: Implement removeRange, and update some documentation on the list interface. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 2 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
Index: tests/corelib/src/ListSetRangeTest.dart
===================================================================
--- tests/corelib/src/ListSetRangeTest.dart (revision 394)
+++ tests/corelib/src/ListSetRangeTest.dart (working copy)
@@ -63,11 +63,12 @@
expectIOORE(() { list.setRange(-1, 1, [1]); });
expectIOORE(() { list.setRange(0, 1, [1], -1); });
- // A negative length prevails, and does not throw an exception.
- list.setRange(0, -1, [1]);
- Expect.listEquals([1, 2], list);
+ // A negative length throws an IllegalArgumentException.
+ Expect.throws(() { list.setRange(0, -1, [1]); },
+ (e) => e is IllegalArgumentException);
- list.setRange(-1, -1, [1], -1);
+ Expect.throws(() { list.setRange(-1, -1, [1], -1); },
+ (e) => e is IllegalArgumentException);
Expect.listEquals([1, 2], list);
// A zero length prevails, and does not throw an exception.
« compiler/lib/implementation/array.dart ('K') | « tests/corelib/src/ListRemoveRangeTest.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698