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

Unified Diff: tests/corelib/queue_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/iterable_contains_test.dart ('k') | tests/corelib/set_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/corelib/queue_test.dart
diff --git a/tests/corelib/queue_test.dart b/tests/corelib/queue_test.dart
index 72aea35d9f82bc8315891f83a2bfabea1fdc59d7..e36ab42bc53aca1417daba9d56a9eed320942a71 100644
--- a/tests/corelib/queue_test.dart
+++ b/tests/corelib/queue_test.dart
@@ -225,19 +225,15 @@ abstract class QueueTest {
queue.remove(10);
testLength(29, queue);
- queue.removeAll([4, 6]);
- testLength(23, queue);
-
- queue.retainAll([1, 3, 5, 7, 9, 10]); // Remove 2 and 8.
- testLength(17, queue);
-
queue.removeWhere((x) => x == 7);
- testLength(14, queue);
+ testLength(26, queue);
queue.retainWhere((x) => x != 3);
- testLength(11, queue);
+ testLength(23, queue);
- Expect.listEquals([9, 1, 5, 9, 10, 1, 5, 9, 10, 1, 5], queue.toList());
+ Expect.listEquals(
+ [6, 8, 9, 1, 2, 4, 5, 6, 8, 9, 10, 1, 2, 4, 5, 6, 8, 9, 10, 1, 2, 4, 5],
+ queue.toList());
}
void testLarge() {
@@ -271,13 +267,10 @@ abstract class QueueTest {
}
Expect.equals(N - 1000, queue.length);
- queue.retainAll(set);
- Expect.equals(N - 1000, queue.length);
-
queue.remove(N >> 1);
Expect.equals(N - 1001, queue.length);
- queue.removeAll(set);
+ queue.clear();
Expect.equals(0, queue.length);
Expect.isTrue(queue.isEmpty);
« no previous file with comments | « tests/corelib/iterable_contains_test.dart ('k') | tests/corelib/set_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698