| OLD | NEW |
| 1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 dart.pkg.isolate.isolaterunner_test; | 5 library dart.pkg.isolate.isolaterunner_test; |
| 6 | 6 |
| 7 import "package:isolate/ports.dart"; | 7 import 'dart:async'; |
| 8 import "package:unittest/unittest.dart"; | 8 import 'dart:isolate'; |
| 9 import "dart:async"; | 9 |
| 10 import "dart:isolate"; | 10 import 'package:isolate/ports.dart'; |
| 11 import 'package:unittest/unittest.dart'; |
| 11 | 12 |
| 12 const Duration MS = const Duration(milliseconds: 1); | 13 const Duration MS = const Duration(milliseconds: 1); |
| 13 | 14 |
| 14 main() { | 15 main() { |
| 15 testSingleCallbackPort(); | 16 testSingleCallbackPort(); |
| 16 testSingleCompletePort(); | 17 testSingleCompletePort(); |
| 17 testSingleResponseFuture(); | 18 testSingleResponseFuture(); |
| 18 testSingleResultFuture(); | 19 testSingleResultFuture(); |
| 19 testSingleResponseChannel(); | 20 testSingleResponseChannel(); |
| 20 } | 21 } |
| (...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 507 test("singleResponseChannelTimeoutOnTimeoutAsyncError", () { | 508 test("singleResponseChannelTimeoutOnTimeoutAsyncError", () { |
| 508 var channel = new SingleResponseChannel(timeout: MS * 100, | 509 var channel = new SingleResponseChannel(timeout: MS * 100, |
| 509 onTimeout: | 510 onTimeout: |
| 510 () => new Future.error(42)); | 511 () => new Future.error(42)); |
| 511 return channel.result.then((v) { fail("unreachable"); }, | 512 return channel.result.then((v) { fail("unreachable"); }, |
| 512 onError: (v, s) { | 513 onError: (v, s) { |
| 513 expect(v, 42); | 514 expect(v, 42); |
| 514 }); | 515 }); |
| 515 }); | 516 }); |
| 516 } | 517 } |
| OLD | NEW |