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

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: Upload Created 7 years, 6 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 | « sdk/lib/async/zone.dart ('k') | tests/lib/async/catch_errors16_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 66%
copy from tests/lib/async/catch_errors8_test.dart
copy to tests/lib/async/catch_errors15_test.dart
index 74abfb703114f26ddff8e1589cb383672b0e30ef..3809683f7748964e86dbc27a6d1b1e1342965fcd 100644
--- a/tests/lib/async/catch_errors8_test.dart
+++ b/tests/lib/async/catch_errors15_test.dart
@@ -11,10 +11,8 @@ main() {
// hang if the callbacks are not invoked and the test will time out.
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,28 +24,25 @@ 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("i $x"); },
+ onDone: () => events.add("inner done"));
events.add("after inner");
throw "inner throw";
}).listen((x) {
- events.add(x);
+ events.add("o $x");
},
onDone: () {
Expect.listEquals(["catch error entry",
"catch error entry2",
"after inner",
"main exit",
- "catch error",
- "inner throw",
- "future error",
- "future error2",
- 499,
- "delayed error",
+ "i catch error",
+ "o inner throw",
+ "i future error",
+ "i future error2",
+ "i 499",
+ "i delayed error",
"inner done",
- "inner done throw"
],
events);
port.close();
« no previous file with comments | « sdk/lib/async/zone.dart ('k') | tests/lib/async/catch_errors16_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698