Chromium Code Reviews| 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(); |