| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // TODO(ajohnsen): This test needs to be updated. | 5 // TODO(ajohnsen): This test needs to be updated. |
| 6 // Can Dart2JS on V8 somehow run it? | 6 // Can Dart2JS on V8 somehow run it? |
| 7 | 7 |
| 8 // Tests for Future.immediate | 8 // Tests for Future.immediate |
| 9 library future2_test; |
| 10 |
| 9 import 'dart:async'; | 11 import 'dart:async'; |
| 10 import 'dart:isolate'; | 12 import 'dart:isolate'; |
| 11 | 13 |
| 12 testImmediate() { | 14 testImmediate() { |
| 13 final future = new Future<String>.immediate("42"); | 15 final future = new Future<String>.immediate("42"); |
| 14 future.then((x) => Expect.equals("42", x)); | 16 future.then((x) => Expect.equals("42", x)); |
| 15 } | 17 } |
| 16 | 18 |
| 17 // Tests for getters (value, exception, isComplete, isValue) | 19 // Tests for getters (value, exception, isComplete, isValue) |
| 18 | 20 |
| (...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 584 testTransformExceptionCompletesNormally(); | 586 testTransformExceptionCompletesNormally(); |
| 585 testTransformExceptionThrows(); | 587 testTransformExceptionThrows(); |
| 586 testTransformExceptionReturns(); | 588 testTransformExceptionReturns(); |
| 587 testTransformExceptionReturnsAFuture(); | 589 testTransformExceptionReturnsAFuture(); |
| 588 testExceptionTravelsAlongBothBranches(); | 590 testExceptionTravelsAlongBothBranches(); |
| 589 testExceptionTravelsAlongBothBranchesAfterComplete(); | 591 testExceptionTravelsAlongBothBranchesAfterComplete(); |
| 590 testExceptionIsHandledInBaseAndBranch(); | 592 testExceptionIsHandledInBaseAndBranch(); |
| 591 testExceptionIsHandledInBaseAndBranchAfterComplete(); | 593 testExceptionIsHandledInBaseAndBranchAfterComplete(); |
| 592 */ | 594 */ |
| 593 } | 595 } |
| OLD | NEW |