| 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 08cb7a164a460bbac2fb73402538325fb57b232e..a520b1b3125d4e67fa64d3fb0b1758813a891f83 100644
|
| --- a/tests/lib/async/stream_state_test.dart
|
| +++ b/tests/lib/async/stream_state_test.dart
|
| @@ -19,30 +19,30 @@ main() {
|
| mainTest(bool broadcast) {
|
| var p = broadcast ? "BC" : "SC";
|
| test("$p-sub-data-done", () {
|
| - var t = new StreamProtocolTest(broadcast);
|
| - t..expectSubscription()
|
| + var t = new StreamProtocolTest(broadcast: broadcast);
|
| + t..expectListen()
|
| ..expectData(42)
|
| ..expectDone()
|
| ..expectCancel();
|
| - t..subscribe()..add(42)..close();
|
| + t..listen()..add(42)..close();
|
| });
|
|
|
| test("$p-data-done-sub", () {
|
| - var t = new StreamProtocolTest(broadcast);
|
| + var t = new StreamProtocolTest(broadcast: broadcast);
|
| if (broadcast) {
|
| t..expectDone();
|
| } else {
|
| - t..expectSubscription()
|
| + t..expectListen()
|
| ..expectData(42)
|
| ..expectDone()
|
| ..expectCancel();
|
| }
|
| - t..add(42)..close()..subscribe();
|
| + t..add(42)..close()..listen();
|
| });
|
|
|
| test("$p-sub-data/pause+resume-done", () {
|
| - var t = new StreamProtocolTest(broadcast);
|
| - t..expectSubscription()
|
| + var t = new StreamProtocolTest(broadcast: broadcast);
|
| + t..expectListen()
|
| ..expectData(42, () {
|
| t.pause();
|
| t.resume();
|
| @@ -50,16 +50,16 @@ mainTest(bool broadcast) {
|
| })
|
| ..expectDone()
|
| ..expectCancel();
|
| - t..subscribe()..add(42);
|
| + t..listen()..add(42);
|
| });
|
|
|
| test("$p-sub-data-unsubonerror", () {
|
| - var t = new StreamProtocolTest(broadcast);
|
| - t..expectSubscription()
|
| + var t = new StreamProtocolTest(broadcast: broadcast);
|
| + t..expectListen()
|
| ..expectData(42)
|
| ..expectError("bad")
|
| ..expectCancel();
|
| - t..subscribe(cancelOnError: true)
|
| + t..listen(cancelOnError: true)
|
| ..add(42)
|
| ..error("bad")
|
| ..add(43)
|
| @@ -67,14 +67,14 @@ mainTest(bool broadcast) {
|
| });
|
|
|
| test("$p-sub-data-no-unsubonerror", () {
|
| - var t = new StreamProtocolTest(broadcast);
|
| - t..expectSubscription()
|
| + var t = new StreamProtocolTest(broadcast: broadcast);
|
| + t..expectListen()
|
| ..expectData(42)
|
| ..expectError("bad")
|
| ..expectData(43)
|
| ..expectDone()
|
| ..expectCancel();
|
| - t..subscribe(cancelOnError: false)
|
| + t..listen(cancelOnError: false)
|
| ..add(42)
|
| ..error("bad")
|
| ..add(43)
|
| @@ -82,15 +82,15 @@ mainTest(bool broadcast) {
|
| });
|
|
|
| test("$p-pause-resume-during-event", () {
|
| - var t = new StreamProtocolTest(broadcast);
|
| - t..expectSubscription()
|
| + var t = new StreamProtocolTest(broadcast: broadcast);
|
| + t..expectListen()
|
| ..expectData(42, () {
|
| t.pause();
|
| t.resume();
|
| })
|
| ..expectDone()
|
| ..expectCancel();
|
| - t..subscribe()
|
| + t..listen()
|
| ..add(42)
|
| ..close();
|
| });
|
|
|