| 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();
|
|
|