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

Side by Side Diff: tests/corelib/collection_removes_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/collection_from_test.dart ('k') | tests/corelib/collection_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 testRemove(Collection base) { 5 testRemove(Collection base) {
8 int length = base.length; 6 int length = base.length;
9 for (int i = 0; i < length; i++) { 7 for (int i = 0; i < length; i++) {
10 Expect.isFalse(base.isEmpty); 8 Expect.isFalse(base.isEmpty);
11 base.remove(base.first); 9 base.remove(base.first);
12 } 10 }
13 Expect.isTrue(base.isEmpty); 11 Expect.isTrue(base.isEmpty);
14 } 12 }
15 13
16 testRemoveAll(Collection base, Iterable removes) { 14 testRemoveAll(Collection base, Iterable removes) {
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 testRemoveAll(base.toSet(), delta); 101 testRemoveAll(base.toSet(), delta);
104 testRemoveAll(base.toSet(), deltaSet); 102 testRemoveAll(base.toSet(), deltaSet);
105 testRetainAll(base.toSet(), delta); 103 testRetainAll(base.toSet(), delta);
106 testRetainAll(base.toSet(), deltaSet); 104 testRetainAll(base.toSet(), deltaSet);
107 testRemoveMatching(base.toSet(), deltaSet.contains); 105 testRemoveMatching(base.toSet(), deltaSet.contains);
108 testRetainMatching(base.toSet(), (e) => !deltaSet.contains(e)); 106 testRetainMatching(base.toSet(), (e) => !deltaSet.contains(e));
109 } 107 }
110 } 108 }
111 } 109 }
112 110
OLDNEW
« no previous file with comments | « tests/corelib/collection_from_test.dart ('k') | tests/corelib/collection_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698