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

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

Issue 11887016: Make StreamController's unnamed constructor create a single-sub stream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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
« no previous file with comments | « tests/lib/async/merge_stream_test.dart ('k') | tests/lib/async/stream_controller_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/lib/async/stream_controller_async_test.dart
diff --git a/tests/lib/async/stream_controller_async_test.dart b/tests/lib/async/stream_controller_async_test.dart
index 7abd9118fbcca403f58ea6ff575060843cd68e9e..2ce75575b03a16523e06892694802541d8638d7b 100644
--- a/tests/lib/async/stream_controller_async_test.dart
+++ b/tests/lib/async/stream_controller_async_test.dart
@@ -13,7 +13,7 @@ import 'event_helper.dart';
testController() {
// Test reduce
test("StreamController.reduce", () {
- StreamController c = new StreamController();
+ StreamController c = new StreamController.multiSubscription();
c.reduce(0, (a,b) => a + b)
.then(expectAsync1((int v) {
Expect.equals(42, v);
@@ -24,14 +24,14 @@ testController() {
});
test("StreamController.reduce throws", () {
- StreamController c = new StreamController();
+ StreamController c = new StreamController.multiSubscription();
c.reduce(0, (a,b) { throw "Fnyf!"; })
.catchError(expectAsync1((e) { Expect.equals("Fnyf!", e.error); }));
c.add(42);
});
test("StreamController.pipeInto", () {
- StreamController c = new StreamController();
+ StreamController c = new StreamController.multiSubscription();
var list = <int>[];
c.pipeInto(new CollectionSink<int>(list))
.whenComplete(expectAsync0(() {
@@ -48,7 +48,7 @@ testController() {
testSingleController() {
test("Single-subscription StreamController.reduce", () {
- StreamController c = new StreamController.singleSubscription();
+ StreamController c = new StreamController();
c.reduce(0, (a,b) => a + b)
.then(expectAsync1((int v) { Expect.equals(42, v); }));
c.add(10);
@@ -57,14 +57,14 @@ testSingleController() {
});
test("Single-subscription StreamController.reduce throws", () {
- StreamController c = new StreamController.singleSubscription();
+ StreamController c = new StreamController();
c.reduce(0, (a,b) { throw "Fnyf!"; })
.catchError(expectAsync1((e) { Expect.equals("Fnyf!", e.error); }));
c.add(42);
});
test("Single-subscription StreamController.pipeInto", () {
- StreamController c = new StreamController.singleSubscription();
+ StreamController c = new StreamController();
var list = <int>[];
c.pipeInto(new CollectionSink<int>(list))
.whenComplete(expectAsync0(() {
@@ -79,7 +79,7 @@ testSingleController() {
});
test("Single-subscription StreamController subscription changes", () {
- StreamController c = new StreamController.singleSubscription();
+ StreamController c = new StreamController();
StreamSink sink = c.sink;
Stream stream = c.stream;
int counter = 0;
@@ -103,7 +103,7 @@ testSingleController() {
test("Single-subscription StreamController events are buffered when"
" there is no subscriber",
() {
- StreamController c = new StreamController.singleSubscription();
+ StreamController c = new StreamController();
StreamSink sink = c.sink;
Stream stream = c.stream;
int counter = 0;
@@ -122,7 +122,7 @@ testSingleController() {
// Test subscription changes while firing.
test("Single-subscription StreamController subscription changes while firing",
() {
- StreamController c = new StreamController.singleSubscription();
+ StreamController c = new StreamController();
StreamSink sink = c.sink;
Stream stream = c.stream;
int counter = 0;
« no previous file with comments | « tests/lib/async/merge_stream_test.dart ('k') | tests/lib/async/stream_controller_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698