Chromium Code Reviews| Index: tests/lib/async/futures_test.dart |
| diff --git a/tests/lib/async/futures_test.dart b/tests/lib/async/futures_test.dart |
| index 9b7f00a4914a16c5ca9fed3c7f75a4be0e16191d..d7096347b1a4ce5af7d3679c3744b480759cc217 100644 |
| --- a/tests/lib/async/futures_test.dart |
| +++ b/tests/lib/async/futures_test.dart |
| @@ -119,6 +119,20 @@ Future testWaitWithMultipleErrorsWithStackTrace() { |
| }); |
| } |
| +Future testEagerWait() { |
|
floitsch
2013/11/19 10:50:34
test not called.
Lasse Reichstein Nielsen
2013/11/20 09:29:28
Whoops. Fixed.
|
| + Completer c1 = new Completer(); |
| + Completer c2 = new Completer(); |
| + List<Future> futures = <Future>[c1.future, c2.future]; |
| + Future waited = Future.wait(futures, eagerError: true); |
| + var result = waited.then((v) { throw "should not be called"; }, |
| + onError: (e, s) { |
|
floitsch
2013/11/19 10:50:34
also test that stack trace is passed through.
Lasse Reichstein Nielsen
2013/11/20 09:29:28
Will do.
|
| + Expect.equals(e, 42); |
| + returntrue; |
|
floitsch
2013/11/19 10:50:34
return true
Lasse Reichstein Nielsen
2013/11/20 09:29:28
Quite obvious that it isn't called too. :(
|
| + }); |
| + c1.completeError(42); |
| + return result; |
| +} |
| + |
| Future testForEachEmpty() { |
| return Future.forEach([], (_) { |
| throw 'should not be called'; |