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

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

Issue 50373003: Expose the cancelOnError in the StreamController.addStream. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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_controller.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_async_test.dart
diff --git a/tests/lib/async/stream_controller_async_test.dart b/tests/lib/async/stream_controller_async_test.dart
index 837872833127d9cae8707cbf7015d2f5f61eca80..e3c75b767d0b1750d70813238fd8bc41cae84548 100644
--- a/tests/lib/async/stream_controller_async_test.dart
+++ b/tests/lib/async/stream_controller_async_test.dart
@@ -679,9 +679,10 @@ void testSink({bool sync, bool broadcast, bool asBroadcast}) {
test("$type-controller-addstream-error-stop", () {
// Check that addStream defaults to ending after the first error.
var done = expectAsync0((){});
- var c = broadcast ? new StreamController.broadcast(sync: sync)
- : new StreamController(sync: sync);
- var stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream;
+ StreamController c = broadcast
+ ? new StreamController.broadcast(sync: sync)
+ : new StreamController(sync: sync);
+ Stream stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream;
var actual = new Events.capture(stream);
var source = new Events();
@@ -703,9 +704,10 @@ void testSink({bool sync, bool broadcast, bool asBroadcast}) {
// Check that addStream with cancelOnError:false passes all data and errors
// to the controller.
var done = expectAsync0((){});
- var c = broadcast ? new StreamController.broadcast(sync: sync)
- : new StreamController(sync: sync);
- var stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream;
+ StreamController c = broadcast
+ ? new StreamController.broadcast(sync: sync)
+ : new StreamController(sync: sync);
+ Stream stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream;
var actual = new Events.capture(stream);
var source = new Events();
@@ -725,9 +727,10 @@ void testSink({bool sync, bool broadcast, bool asBroadcast}) {
test("$type-controller-addstream-twice", () {
// Using addStream twice on the same stream
var done = expectAsync0((){});
- var c = broadcast ? new StreamController.broadcast(sync: sync)
- : new StreamController(sync: sync);
- var stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream;
+ StreamController c = broadcast
+ ? new StreamController.broadcast(sync: sync)
+ : new StreamController(sync: sync);
+ Stream stream = asBroadcast ? c.stream.asBroadcastStream() : c.stream;
var actual = new Events.capture(stream);
// Streams of five events, throws on 3.
« no previous file with comments | « sdk/lib/async/stream_controller.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698