| 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 library future_test; | 5 library future_test; |
| 6 | 6 |
| 7 import "package:expect/expect.dart"; |
| 7 import 'dart:async'; | 8 import 'dart:async'; |
| 8 import 'dart:isolate'; | 9 import 'dart:isolate'; |
| 9 | 10 |
| 10 testImmediate() { | 11 testImmediate() { |
| 11 final future = new Future<String>.immediate("42"); | 12 final future = new Future<String>.immediate("42"); |
| 12 var port = new ReceivePort(); | 13 var port = new ReceivePort(); |
| 13 future.then((x) { | 14 future.then((x) { |
| 14 Expect.equals("42", x); | 15 Expect.equals("42", x); |
| 15 port.close(); | 16 port.close(); |
| 16 }); | 17 }); |
| (...skipping 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 619 testFutureCatchThrowsAsync(); | 620 testFutureCatchThrowsAsync(); |
| 620 testFutureWhenThrowsAsync(); | 621 testFutureWhenThrowsAsync(); |
| 621 testFutureCatchRethrowsAsync(); | 622 testFutureCatchRethrowsAsync(); |
| 622 | 623 |
| 623 testChainedFutureValue(); | 624 testChainedFutureValue(); |
| 624 testChainedFutureValueDelay(); | 625 testChainedFutureValueDelay(); |
| 625 testChainedFutureError(); | 626 testChainedFutureError(); |
| 626 } | 627 } |
| 627 | 628 |
| 628 | 629 |
| OLD | NEW |