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

Unified Diff: tests/lib/async/stream_controller_test.dart

Issue 14242008: Fix skipWhile. (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 | « sdk/lib/async/stream_pipe.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/stream_controller_test.dart
diff --git a/tests/lib/async/stream_controller_test.dart b/tests/lib/async/stream_controller_test.dart
index e3a6da24b0a1d874f187aac004be9c8a997a5d01..9990f44534f8f55fb38872f8848d589db3ff38bc 100644
--- a/tests/lib/async/stream_controller_test.dart
+++ b/tests/lib/async/stream_controller_test.dart
@@ -360,6 +360,20 @@ testExtraMethods() {
c = new StreamController();
+ expectedEvents = new Events()..add(2)..add(3)..close();
+ actualEvents = new Events.capture(c.stream.skipWhile((x) => x <= 1));
+ sentEvents.replay(c);
+ Expect.listEquals(expectedEvents.events, actualEvents.events);
+
+
+ c = new StreamController();
+ expectedEvents = new Events()..add(1)..add(2)..add(3)..close();
+ actualEvents = new Events.capture(c.stream.skipWhile((x) => false));
+ sentEvents.replay(c);
+ Expect.listEquals(expectedEvents.events, actualEvents.events);
+
+
+ c = new StreamController();
expectedEvents = new Events()..add(1)..add(2)..close();
actualEvents = new Events.capture(c.stream.take(2));
sentEvents.replay(c);
« no previous file with comments | « sdk/lib/async/stream_pipe.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698