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 unittest.runner.isolate_test; | 5 library unittest.runner.vm.isolate_test; |
6 | 6 |
7 import 'dart:isolate'; | 7 import 'dart:isolate'; |
8 | 8 |
9 import '../backend/live_test.dart'; | 9 import '../../backend/live_test.dart'; |
10 import '../backend/live_test_controller.dart'; | 10 import '../../backend/live_test_controller.dart'; |
11 import '../backend/state.dart'; | 11 import '../../backend/state.dart'; |
12 import '../backend/suite.dart'; | 12 import '../../backend/suite.dart'; |
13 import '../backend/test.dart'; | 13 import '../../backend/test.dart'; |
14 import '../util/remote_exception.dart'; | 14 import '../../util/remote_exception.dart'; |
15 | 15 |
16 /// A test in another isolate. | 16 /// A test in another isolate. |
17 class IsolateTest implements Test { | 17 class IsolateTest implements Test { |
18 final String name; | 18 final String name; |
19 | 19 |
20 /// The port on which to communicate with the remote test. | 20 /// The port on which to communicate with the remote test. |
21 final SendPort _sendPort; | 21 final SendPort _sendPort; |
22 | 22 |
23 IsolateTest(this.name, this._sendPort); | 23 IsolateTest(this.name, this._sendPort); |
24 | 24 |
(...skipping 23 matching lines...) Expand all Loading... |
48 assert(message['type'] == 'complete'); | 48 assert(message['type'] == 'complete'); |
49 controller.completer.complete(); | 49 controller.completer.complete(); |
50 } | 50 } |
51 }); | 51 }); |
52 }, onClose: () { | 52 }, onClose: () { |
53 if (receivePort != null) receivePort.close(); | 53 if (receivePort != null) receivePort.close(); |
54 }); | 54 }); |
55 return controller.liveTest; | 55 return controller.liveTest; |
56 } | 56 } |
57 } | 57 } |
OLD | NEW |