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

Unified Diff: tests/corelib/queue_test.dart

Issue 138953015: Fix bug in DoubleLinkedQueue where removing from empty queue throws. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 11 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 | « sdk/lib/core/annotations.dart ('k') | no next file » | 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 3cf139ff8808d5307bced4f636b9e2d576990374..e590dce63142ad74463610464bb39e4891e45705 100644
--- a/tests/corelib/queue_test.dart
+++ b/tests/corelib/queue_test.dart
@@ -237,6 +237,13 @@ abstract class QueueTest {
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());
+
+ // Regression test: http://dartbug.com/16270
+ // These should all do nothing, and should not throw.
+ Queue emptyQueue = newQueue();
+ emptyQueue.remove(0);
+ emptyQueue.removeWhere((x) => null);
+ emptyQueue.retainWhere((x) => null);
}
void testLarge() {
« no previous file with comments | « sdk/lib/core/annotations.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698