OLD | NEW |
1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 analyzer.test.generated.bazel_test; | 5 library analyzer.test.generated.bazel_test; |
6 | 6 |
7 import 'package:analyzer/file_system/memory_file_system.dart'; | 7 import 'package:analyzer/file_system/memory_file_system.dart'; |
8 import 'package:analyzer/src/generated/bazel.dart'; | 8 import 'package:analyzer/src/generated/bazel.dart'; |
9 import 'package:analyzer/src/generated/source.dart'; | 9 import 'package:analyzer/src/generated/source.dart'; |
| 10 import 'package:test/test.dart'; |
10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 11 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
11 import 'package:unittest/unittest.dart'; | |
12 | 12 |
13 import '../utils.dart'; | 13 import '../utils.dart'; |
14 | 14 |
15 main() { | 15 main() { |
16 initializeTestEnvironment(); | 16 initializeTestEnvironment(); |
17 defineReflectiveTests(BazelWorkspaceTest); | 17 defineReflectiveSuite(() { |
18 defineReflectiveTests(BazelFileUriResolverTest); | 18 defineReflectiveTests(BazelWorkspaceTest); |
| 19 defineReflectiveTests(BazelFileUriResolverTest); |
| 20 }); |
19 } | 21 } |
20 | 22 |
21 @reflectiveTest | 23 @reflectiveTest |
22 class BazelFileUriResolverTest extends _BaseTest { | 24 class BazelFileUriResolverTest extends _BaseTest { |
23 BazelWorkspace workspace; | 25 BazelWorkspace workspace; |
24 BazelFileUriResolver resolver; | 26 BazelFileUriResolver resolver; |
25 | 27 |
26 void setUp() { | 28 void setUp() { |
27 provider.newFile(_p('/workspace/WORKSPACE'), ''); | 29 provider.newFile(_p('/workspace/WORKSPACE'), ''); |
28 workspace = new BazelWorkspace(provider, _p('/workspace')); | 30 workspace = new BazelWorkspace(provider, _p('/workspace')); |
(...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 } | 219 } |
218 | 220 |
219 class _BaseTest { | 221 class _BaseTest { |
220 final MemoryResourceProvider provider = new MemoryResourceProvider(); | 222 final MemoryResourceProvider provider = new MemoryResourceProvider(); |
221 | 223 |
222 /** | 224 /** |
223 * Return the [provider] specific path for the given Posix [path]. | 225 * Return the [provider] specific path for the given Posix [path]. |
224 */ | 226 */ |
225 String _p(String path) => provider.convertPath(path); | 227 String _p(String path) => provider.convertPath(path); |
226 } | 228 } |
OLD | NEW |