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

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

Issue 11740027: Rename unsubscribe to cancel. (Closed) Base URL: https://dart.googlecode.com/svn/experimental/lib_v2/dart
Patch Set: Address comments. Created 7 years, 12 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/stream_controller_async_test.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_test.dart
diff --git a/tests/lib/async/stream_controller_test.dart b/tests/lib/async/stream_controller_test.dart
index 89788df4c6778696bfd1abd1aff103787ecfd9e5..e06ec4ad512c92d2775001bac7ae6624c92d5c14 100644
--- a/tests/lib/async/stream_controller_test.dart
+++ b/tests/lib/async/stream_controller_test.dart
@@ -33,7 +33,7 @@ testController() {
expectedEvents = new Events()..add(42)..error("error")..add(37);
actualEvents = new Events.capture(c, unsubscribeOnError: false);
expectedEvents.replay(c);
- actualEvents.subscription.unsubscribe();
+ actualEvents.subscription.cancel();
c.add("Are you there"); // Not sent to actualEvents.
Expect.listEquals(expectedEvents.events, actualEvents.events);
@@ -128,14 +128,14 @@ testController() {
var subscription = stream.listen(null);
subscription.onData((data) {
counter += data;
- subscription.unsubscribe();
+ subscription.cancel();
stream.listen((data) {
counter += 10 * data;
});
var subscription2 = stream.listen(null);
subscription2.onData((data) {
counter += 100 * data;
- if (data == 4) subscription2.unsubscribe();
+ if (data == 4) subscription2.cancel();
});
});
sink.add(1); // seen by stream 1
@@ -173,7 +173,7 @@ testSingleController() {
expectedEvents = new Events()..add(42)..error("error")..add(37);
actualEvents = new Events.capture(c, unsubscribeOnError: false);
expectedEvents.replay(c);
- actualEvents.subscription.unsubscribe();
+ actualEvents.subscription.cancel();
c.add("Are you there"); // Not sent to actualEvents.
Expect.listEquals(expectedEvents.events, actualEvents.events);
« no previous file with comments | « tests/lib/async/stream_controller_async_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698