OLD | NEW |
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 test.integration.analysis.packageRoot; | 5 library test.integration.analysis.packageRoot; |
6 | 6 |
7 import 'package:analysis_server/src/protocol.dart'; | 7 import 'package:analysis_server/src/protocol.dart'; |
8 import 'package:path/path.dart'; | 8 import 'package:path/path.dart'; |
| 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
9 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
10 | 11 |
11 import '../../reflective_tests.dart'; | |
12 import '../integration_tests.dart'; | 12 import '../integration_tests.dart'; |
13 | 13 |
14 main() { | 14 main() { |
15 runReflectiveTests(Test); | 15 defineReflectiveTests(Test); |
16 } | 16 } |
17 | 17 |
18 @reflectiveTest | 18 @reflectiveTest |
19 class Test extends AbstractAnalysisServerIntegrationTest { | 19 class Test extends AbstractAnalysisServerIntegrationTest { |
20 test_package_root() { | 20 test_package_root() { |
21 String projPath = sourcePath('project'); | 21 String projPath = sourcePath('project'); |
22 String mainPath = join(projPath, 'main.dart'); | 22 String mainPath = join(projPath, 'main.dart'); |
23 String packagesPath = sourcePath('packages'); | 23 String packagesPath = sourcePath('packages'); |
24 String fooBarPath = join(packagesPath, 'foo', 'bar.dart'); | 24 String fooBarPath = join(packagesPath, 'foo', 'bar.dart'); |
25 String mainText = """ | 25 String mainText = """ |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 navigationTargets[navigationTargetIndex]; | 66 navigationTargets[navigationTargetIndex]; |
67 String navigationFile = | 67 String navigationFile = |
68 navigationTargetFiles[navigationTarget.fileIndex]; | 68 navigationTargetFiles[navigationTarget.fileIndex]; |
69 expect(navigationFile, equals(normalizedFooBarPath)); | 69 expect(navigationFile, equals(normalizedFooBarPath)); |
70 } | 70 } |
71 } | 71 } |
72 expect(found, isTrue); | 72 expect(found, isTrue); |
73 }); | 73 }); |
74 } | 74 } |
75 } | 75 } |
OLD | NEW |