| 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 test.services.dependencies.library; | 5 library test.services.dependencies.library; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/services/dependencies/library_dependencies.d
art'; | 7 import 'package:analysis_server/src/services/dependencies/library_dependencies.d
art'; |
| 8 import 'package:test/test.dart'; |
| 8 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 9 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 9 import 'package:unittest/unittest.dart'; | |
| 10 | 10 |
| 11 import '../../abstract_context.dart'; | 11 import '../../abstract_context.dart'; |
| 12 import '../../utils.dart'; | 12 import '../../utils.dart'; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 initializeTestEnvironment(); | 15 initializeTestEnvironment(); |
| 16 defineReflectiveTests(LibraryDependenciesTest); | 16 defineReflectiveSuite(() { |
| 17 defineReflectiveTests(LibraryDependenciesTest); |
| 18 }); |
| 17 } | 19 } |
| 18 | 20 |
| 19 @reflectiveTest | 21 @reflectiveTest |
| 20 class LibraryDependenciesTest extends AbstractContextTest { | 22 class LibraryDependenciesTest extends AbstractContextTest { |
| 21 test_LibraryDependencies() { | 23 test_LibraryDependencies() { |
| 22 addSource('/lib1.dart', 'import "lib2.dart";'); | 24 addSource('/lib1.dart', 'import "lib2.dart";'); |
| 23 addSource('/lib2.dart', 'import "lib1.dart";'); | 25 addSource('/lib2.dart', 'import "lib1.dart";'); |
| 24 addSource('/lib3.dart', 'import "lib2.dart";'); | 26 addSource('/lib3.dart', 'import "lib2.dart";'); |
| 25 addSource('/lib4.dart', 'import "lib5.dart";'); | 27 addSource('/lib4.dart', 'import "lib5.dart";'); |
| 26 provider.newFile('/lib5.dart', 'import "lib6.dart";'); | 28 provider.newFile('/lib5.dart', 'import "lib6.dart";'); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 44 } | 46 } |
| 45 | 47 |
| 46 test_PackageMaps() { | 48 test_PackageMaps() { |
| 47 //TODO(pquitslund): add test | 49 //TODO(pquitslund): add test |
| 48 } | 50 } |
| 49 | 51 |
| 50 void _performAnalysis() { | 52 void _performAnalysis() { |
| 51 while (context.performAnalysisTask().hasMoreWork); | 53 while (context.performAnalysisTask().hasMoreWork); |
| 52 } | 54 } |
| 53 } | 55 } |
| OLD | NEW |