| Index: tests/corelib/src/FutureTest.dart
|
| diff --git a/tests/corelib/src/FutureTest.dart b/tests/corelib/src/FutureTest.dart
|
| index 43c11ff7800cb0c5ad3b0c00fee145f5c4d79c3e..967abbbf6618f814ab744b748b976a85a8b8c205 100644
|
| --- a/tests/corelib/src/FutureTest.dart
|
| +++ b/tests/corelib/src/FutureTest.dart
|
| @@ -166,6 +166,30 @@ testExceptionHandlerReturnsFalse2() {
|
| Expect.isTrue(reached);
|
| }
|
|
|
| +testExceptionHandlerAfterCompleteThenNotCalled() {
|
| + final completer = new Completer<int>();
|
| + final future = completer.future;
|
| + final ex = new Exception();
|
| +
|
| + var ex2;
|
| + completer.completeException(ex);
|
| + future.handleException((e) { ex2 = e; return true; });
|
| + future.then((e) { });
|
| + Expect.equals(ex, ex2);
|
| +}
|
| +
|
| +testExceptionHandlerAfterCompleteReturnsFalseThenThrows() {
|
| + final completer = new Completer<int>();
|
| + final future = completer.future;
|
| + final ex = new Exception();
|
| +
|
| + var ex2;
|
| + completer.completeException(ex);
|
| + future.handleException((e) { ex2 = e; return false; });
|
| + Expect.throws(() { future.then((e) { }); });
|
| + Expect.equals(ex, ex2);
|
| +}
|
| +
|
| // Tests for Future.transform
|
|
|
| testTransformSuccess() {
|
| @@ -263,6 +287,8 @@ main() {
|
| testExceptionHandlerReturnsTrue2();
|
| testExceptionHandlerReturnsFalse();
|
| testExceptionHandlerReturnsFalse2();
|
| + testExceptionHandlerAfterCompleteThenNotCalled();
|
| + testExceptionHandlerAfterCompleteReturnsFalseThenThrows();
|
| testTransformSuccess();
|
| testTransformFutureFails();
|
| testTransformTransformerFails();
|
|
|