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:io'; | 7 import 'dart:io'; |
8 | 8 |
9 import 'package:path/path.dart' as p; | 9 import 'package:path/path.dart' as p; |
10 import 'package:unittest/src/loader.dart'; | 10 import 'package:unittest/src/loader.dart'; |
11 import 'package:unittest/src/state.dart'; | 11 import 'package:unittest/src/state.dart'; |
12 import 'package:unittest/unittest.dart'; | 12 import 'package:unittest/unittest.dart'; |
13 | 13 |
| 14 import 'io.dart'; |
14 import 'utils.dart'; | 15 import 'utils.dart'; |
15 | 16 |
16 Loader _loader; | 17 Loader _loader; |
17 String _sandbox; | 18 String _sandbox; |
18 | 19 |
19 final _tests = """ | 20 final _tests = """ |
20 import 'dart:async'; | 21 import 'dart:async'; |
21 | 22 |
22 import 'package:unittest/unittest.dart'; | 23 import 'package:unittest/unittest.dart'; |
23 | 24 |
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 | 131 |
131 test("can run tests in those suites", () { | 132 test("can run tests in those suites", () { |
132 var suite = suites.firstWhere((suite) => suite.name.contains("a_test")); | 133 var suite = suites.firstWhere((suite) => suite.name.contains("a_test")); |
133 var liveTest = suite.tests[1].load(suite); | 134 var liveTest = suite.tests[1].load(suite); |
134 expectSingleFailure(liveTest); | 135 expectSingleFailure(liveTest); |
135 return liveTest.run().whenComplete(() => liveTest.close()); | 136 return liveTest.run().whenComplete(() => liveTest.close()); |
136 }); | 137 }); |
137 }); | 138 }); |
138 }); | 139 }); |
139 } | 140 } |
OLD | NEW |