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

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

Issue 16125005: Make new StreamController be async by default. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 7 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/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();
});

Powered by Google App Engine
This is Rietveld 408576698