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.loader; | 5 library unittest.loader; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:io'; | 8 import 'dart:io'; |
9 import 'dart:isolate'; | 9 import 'dart:isolate'; |
10 | 10 |
11 import 'package:path/path.dart' as p; | 11 import 'package:path/path.dart' as p; |
12 | 12 |
13 import 'dart.dart'; | 13 import 'dart.dart'; |
| 14 import 'io.dart'; |
14 import 'isolate_test.dart'; | 15 import 'isolate_test.dart'; |
15 import 'load_exception.dart'; | 16 import 'load_exception.dart'; |
16 import 'remote_exception.dart'; | 17 import 'remote_exception.dart'; |
17 import 'suite.dart'; | 18 import 'suite.dart'; |
18 | 19 |
19 /// A class for finding test files and loading them into a runnable form. | 20 /// A class for finding test files and loading them into a runnable form. |
20 class Loader { | 21 class Loader { |
21 /// The package root to use for loading tests, or `null` to use the automatic | 22 /// The package root to use for loading tests, or `null` to use the automatic |
22 /// root. | 23 /// root. |
23 final String _packageRoot; | 24 final String _packageRoot; |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 | 99 |
99 /// Closes the loader and releases all resources allocated by it. | 100 /// Closes the loader and releases all resources allocated by it. |
100 Future close() { | 101 Future close() { |
101 for (var isolate in _isolates) { | 102 for (var isolate in _isolates) { |
102 isolate.kill(); | 103 isolate.kill(); |
103 } | 104 } |
104 _isolates.clear(); | 105 _isolates.clear(); |
105 return new Future.value(); | 106 return new Future.value(); |
106 } | 107 } |
107 } | 108 } |
OLD | NEW |