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

Side by Side Diff: tests/corelib/list_remove_range_test.dart

Issue 12743005: Revert "Remove Expect from core library." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Reupload (first upload failed). Created 7 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tests/corelib/list_map_test.dart ('k') | tests/corelib/list_removeat_test.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import "package:expect/expect.dart";
6
7 main() { 5 main() {
8 var list = []; 6 var list = [];
9 list.removeRange(0, 0); 7 list.removeRange(0, 0);
10 Expect.equals(0, list.length); 8 Expect.equals(0, list.length);
11 expectIOORE(() { list.removeRange(0, 1); }); 9 expectIOORE(() { list.removeRange(0, 1); });
12 10
13 list.add(1); 11 list.add(1);
14 list.removeRange(0, 0); 12 list.removeRange(0, 0);
15 Expect.equals(1, list.length); 13 Expect.equals(1, list.length);
16 Expect.equals(1, list[0]); 14 Expect.equals(1, list[0]);
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 (e) => e is ArgumentError); 57 (e) => e is ArgumentError);
60 Expect.listEquals([1, 2], list); 58 Expect.listEquals([1, 2], list);
61 59
62 // A zero length prevails, and does not throw an exception. 60 // A zero length prevails, and does not throw an exception.
63 list.removeRange(-1, 0); 61 list.removeRange(-1, 0);
64 Expect.listEquals([1, 2], list); 62 Expect.listEquals([1, 2], list);
65 63
66 list.removeRange(4, 0); 64 list.removeRange(4, 0);
67 Expect.listEquals([1, 2], list); 65 Expect.listEquals([1, 2], list);
68 } 66 }
OLDNEW
« no previous file with comments | « tests/corelib/list_map_test.dart ('k') | tests/corelib/list_removeat_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698