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

Unified Diff: tests/corelib/collection_removes_test.dart

Issue 14173003: Remove Collection, Collections and clean up List/Set/Queue implementations of retain/remove. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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/collection_contains_test.dart ('k') | tests/corelib/is_operator_basic_types_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/collection_removes_test.dart
diff --git a/tests/corelib/collection_removes_test.dart b/tests/corelib/collection_removes_test.dart
index ade1509c02e6d2bc6f1e7a2cf79c9ca5a9a4abaa..47e143d49b07c2a1bcee3338d9258d6c11d161ba 100644
--- a/tests/corelib/collection_removes_test.dart
+++ b/tests/corelib/collection_removes_test.dart
@@ -2,10 +2,10 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
-import "dart:collection";
+import 'dart:collection';
import "package:expect/expect.dart";
-testRemove(Collection base) {
+testRemove(base) {
int length = base.length;
for (int i = 0; i < length; i++) {
Expect.isFalse(base.isEmpty);
@@ -14,7 +14,7 @@ testRemove(Collection base) {
Expect.isTrue(base.isEmpty);
}
-testRemoveAll(Collection base, Iterable removes) {
+testRemoveAll(base, Iterable removes) {
Set retained = new Set();
for (var element in base) {
if (!removes.contains(element)) {
@@ -31,7 +31,7 @@ testRemoveAll(Collection base, Iterable removes) {
}
}
-testRetainAll(Collection base, Iterable retains) {
+testRetainAll(base, Iterable retains) {
Set retained = new Set();
for (var element in base) {
if (retains.contains(element)) {
@@ -48,7 +48,7 @@ testRetainAll(Collection base, Iterable retains) {
}
}
-testRemoveWhere(Collection base, bool test(value)) {
+testRemoveWhere(base, bool test(value)) {
Set retained = new Set();
for (var element in base) {
if (!test(element)) {
@@ -65,7 +65,7 @@ testRemoveWhere(Collection base, bool test(value)) {
}
}
-testRetainWhere(Collection base, bool test(value)) {
+testRetainWhere(base, bool test(value)) {
Set retained = new Set();
for (var element in base) {
if (test(element)) {
@@ -93,13 +93,9 @@ void main() {
testRemove(base.toSet());
var deltaSet = delta.toSet();
- testRemoveAll(base.toList(), delta);
- testRemoveAll(base.toList(), deltaSet);
- testRetainAll(base.toList(), delta);
- testRetainAll(base.toList(), deltaSet);
testRemoveWhere(base.toList(), deltaSet.contains);
testRetainWhere(base.toList(),
- (e) => !deltaSet.contains(e));
+ (e) => !deltaSet.contains(e));
testRemoveAll(base.toSet(), delta);
testRemoveAll(base.toSet(), deltaSet);
@@ -109,13 +105,9 @@ void main() {
testRetainWhere(base.toSet(), (e) => !deltaSet.contains(e));
// Test the ListBase class's List implementation.
- testRemoveAll(new MyList(base.toList()), delta);
- testRemoveAll(new MyList(base.toList()), deltaSet);
- testRetainAll(new MyList(base.toList()), delta);
- testRetainAll(new MyList(base.toList()), deltaSet);
testRemoveWhere(new MyList(base.toList()), deltaSet.contains);
testRetainWhere(new MyList(base.toList()),
- (e) => !deltaSet.contains(e));
+ (e) => !deltaSet.contains(e));
}
}
« no previous file with comments | « tests/corelib/collection_contains_test.dart ('k') | tests/corelib/is_operator_basic_types_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698