| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 futures_test; | 5 library futures_test; |
| 6 import 'dart:async'; | 6 import 'dart:async'; |
| 7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
| 8 | 8 |
| 9 Future testWaitEmpty() { | 9 Future testWaitEmpty() { |
| 10 List<Future> futures = new List<Future>(); | 10 List<Future> futures = new List<Future>(); |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 futures.add(testForEach()); | 65 futures.add(testForEach()); |
| 66 | 66 |
| 67 // Use a receive port for blocking the test. | 67 // Use a receive port for blocking the test. |
| 68 // Note that if the test fails, the program will not end. | 68 // Note that if the test fails, the program will not end. |
| 69 ReceivePort port = new ReceivePort(); | 69 ReceivePort port = new ReceivePort(); |
| 70 Futures.wait(futures).then((List list) { | 70 Futures.wait(futures).then((List list) { |
| 71 Expect.equals(5, list.length); | 71 Expect.equals(5, list.length); |
| 72 port.close(); | 72 port.close(); |
| 73 }); | 73 }); |
| 74 } | 74 } |
| OLD | NEW |