| 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/plugin/protocol/protocol.dart'; | 7 import 'package:analysis_server/plugin/protocol/protocol.dart'; |
| 8 import 'package:path/path.dart'; | 8 import 'package:path/path.dart'; |
| 9 import 'package:test/test.dart'; |
| 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 10 import 'package:unittest/unittest.dart'; | |
| 11 | 11 |
| 12 import '../../utils.dart'; | 12 import '../../utils.dart'; |
| 13 import '../integration_tests.dart'; | 13 import '../integration_tests.dart'; |
| 14 | 14 |
| 15 main() { | 15 main() { |
| 16 initializeTestEnvironment(); | 16 initializeTestEnvironment(); |
| 17 defineReflectiveTests(Test); | 17 defineReflectiveSuite(() { |
| 18 defineReflectiveTests(Test); |
| 19 }); |
| 18 } | 20 } |
| 19 | 21 |
| 20 @reflectiveTest | 22 @reflectiveTest |
| 21 class Test extends AbstractAnalysisServerIntegrationTest { | 23 class Test extends AbstractAnalysisServerIntegrationTest { |
| 22 test_package_root() { | 24 test_package_root() { |
| 23 String projPath = sourcePath('project'); | 25 String projPath = sourcePath('project'); |
| 24 String mainPath = join(projPath, 'main.dart'); | 26 String mainPath = join(projPath, 'main.dart'); |
| 25 String packagesPath = sourcePath('packages'); | 27 String packagesPath = sourcePath('packages'); |
| 26 String fooBarPath = join(packagesPath, 'foo', 'bar.dart'); | 28 String fooBarPath = join(packagesPath, 'foo', 'bar.dart'); |
| 27 String mainText = """ | 29 String mainText = """ |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 navigationTargets[navigationTargetIndex]; | 72 navigationTargets[navigationTargetIndex]; |
| 71 String navigationFile = | 73 String navigationFile = |
| 72 navigationTargetFiles[navigationTarget.fileIndex]; | 74 navigationTargetFiles[navigationTarget.fileIndex]; |
| 73 expect(navigationFile, equals(normalizedFooBarPath)); | 75 expect(navigationFile, equals(normalizedFooBarPath)); |
| 74 } | 76 } |
| 75 } | 77 } |
| 76 expect(found, isTrue); | 78 expect(found, isTrue); |
| 77 }); | 79 }); |
| 78 } | 80 } |
| 79 } | 81 } |
| OLD | NEW |