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

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

Issue 12049013: Change singleSubscription/multiSubscription to normal/broadcast. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments, renamed .multiSubscription to .broadcast. Created 7 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
Index: tests/lib/async/merge_stream_test.dart
diff --git a/tests/lib/async/merge_stream_test.dart b/tests/lib/async/merge_stream_test.dart
index c454dca9ce70fd5f83f66601ef36e6553ab401c0..924f5d3f57df21c95243b4427afc2439da731e6b 100644
--- a/tests/lib/async/merge_stream_test.dart
+++ b/tests/lib/async/merge_stream_test.dart
@@ -11,9 +11,9 @@ import 'event_helper.dart';
testSupercedeStream() {
{ // Simple case of superceding lower priority streams.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..add(3)..add(4)..close();
Events actual = new Events.capture(merge);
@@ -28,9 +28,9 @@ testSupercedeStream() {
}
{ // Superceding more than one stream at a time.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..close();
Events actual = new Events.capture(merge);
@@ -43,9 +43,9 @@ testSupercedeStream() {
}
{ // Closing a stream before superceding it.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..add(3)..close();
Events actual = new Events.capture(merge);
@@ -59,9 +59,9 @@ testSupercedeStream() {
}
{ // Errors from all non-superceded streams are forwarded.
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected =
new Events()..add(1)..error("1")..error("2")..error("3")
@@ -83,9 +83,9 @@ testSupercedeStream() {
}
test("Pausing on a superceding stream", () {
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.superceding([s1.stream, s2.stream, s3.stream]);
Events expected = new Events()..add(1)..add(2)..add(3);
Events actual = new Events.capture(merge);
@@ -114,9 +114,9 @@ testSupercedeStream() {
void testCyclicStream() {
test("Simple case of superceding lower priority streams", () {
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.cyclic([s1.stream, s2.stream, s3.stream]);
Events expected =
new Events()..add(1)..add(2)..add(3)..add(4)..add(5)..add(6)..close();
@@ -139,9 +139,9 @@ void testCyclicStream() {
});
test("Cyclic merge with errors", () {
- StreamController s1 = new StreamController.multiSubscription();
- StreamController s2 = new StreamController.multiSubscription();
- StreamController s3 = new StreamController.multiSubscription();
+ StreamController s1 = new StreamController.broadcast();
+ StreamController s2 = new StreamController.broadcast();
+ StreamController s3 = new StreamController.broadcast();
Stream merge = new Stream.cyclic([s1.stream, s2.stream, s3.stream]);
Events expected =
new Events()..add(1)..error("1")..add(2)..add(3)..error("2")

Powered by Google App Engine
This is Rietveld 408576698