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

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

Issue 15864007: Add zone support to streams. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase 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/catch_errors15_test.dart
diff --git a/tests/lib/async/catch_errors8_test.dart b/tests/lib/async/catch_errors15_test.dart
similarity index 79%
copy from tests/lib/async/catch_errors8_test.dart
copy to tests/lib/async/catch_errors15_test.dart
index c24c3f96af27887286cc3ba679b5c2618e91ae6e..bf59c93eecb536f842115c441f4c3c6de971db33 100644
--- a/tests/lib/async/catch_errors8_test.dart
+++ b/tests/lib/async/catch_errors15_test.dart
@@ -11,10 +11,8 @@ main() {
// time out if the callbacks are not invoked.
var port = new ReceivePort();
var events = [];
- // Test nested `catchErrors`.
- // The nested `catchErrors` throws all kinds of different errors (synchronous
- // and asynchronous). The body of the outer `catchErrors` furthermore has a
- // synchronous `throw`.
+ // Test that the outer `catchErrors` waits for the nested `catchErrors` stream
+ // to be done.
catchErrors(() {
events.add("catch error entry");
catchErrors(() {
@@ -26,10 +24,8 @@ main() {
throw "delayed error";
});
throw "catch error";
- }).listen((x) { events.add(x); })
- .asFuture()
- .then((_) => events.add("inner done"))
- .then((_) { throw "inner done throw"; });
+ }).listen((x) { events.add(x); },
+ onDone: () => events.add("inner done"));
Lasse Reichstein Nielsen 2013/05/29 08:32:26 Indent to '(' - i.e., 5 more.
floitsch 2013/05/29 15:48:56 Done.
events.add("after inner");
throw "inner throw";
}).listen((x) {
@@ -48,7 +44,6 @@ main() {
499,
"delayed error",
"inner done",
- "inner done throw"
],
events);
port.close();

Powered by Google App Engine
This is Rietveld 408576698