Index: tests/lib/async/stream_state_test.dart |
diff --git a/tests/lib/async/stream_state_test.dart b/tests/lib/async/stream_state_test.dart |
index f64d720091e3cd16a26ab268b9feb7d136aaaf07..a7c3ab0152d981a42277f6834ce51160383146eb 100644 |
--- a/tests/lib/async/stream_state_test.dart |
+++ b/tests/lib/async/stream_state_test.dart |
@@ -74,12 +74,21 @@ mainTest({bool sync, bool asBroadcast}) { |
test("$p-sub-data-unsubonerror", () { |
var t = asBroadcast ? new StreamProtocolTest.asBroadcast(sync: sync) |
: new StreamProtocolTest(sync: sync); |
- t..expectListen() |
- ..expectBroadcastListenOpt() |
- ..expectData(42) |
- ..expectError("bad") |
- ..expectBroadcastCancelOpt() |
- ..expectCancel(t.terminate); |
+ if (asBroadcast) { |
+ t..expectListen() |
+ ..expectBroadcastListenOpt() |
floitsch
2013/10/12 18:53:57
You should not need to use "Opt".
This is in the "
Anders Johnsen
2013/10/16 11:52:21
Done.
|
+ ..expectData(42) |
+ ..expectError("bad") |
+ ..expectBroadcastCancelOpt() |
floitsch
2013/10/12 18:53:57
ditto.
Anders Johnsen
2013/10/16 11:52:21
Done.
|
+ ..expectCancel(t.terminate); |
+ } else { |
+ t..expectListen() |
+ ..expectBroadcastListenOpt() |
floitsch
2013/10/12 18:53:57
Remove, since we are in the non-broadcast branch.
Anders Johnsen
2013/10/16 11:52:21
Done.
|
+ ..expectData(42) |
+ ..expectCancel() |
+ ..expectBroadcastCancelOpt() |
floitsch
2013/10/12 18:53:57
ditto.
Anders Johnsen
2013/10/16 11:52:21
Done.
|
+ ..expectError("bad", t.terminate); |
+ } |
t..listen(cancelOnError: true) |
..add(42) |
..error("bad") |