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_reflective_loader/test_reflective_loader.dart'; | 8 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 provider.newFile('/lib6.dart', ''); | 27 provider.newFile('/lib6.dart', ''); |
28 | 28 |
29 _performAnalysis(); | 29 _performAnalysis(); |
30 | 30 |
31 var libs = | 31 var libs = |
32 new LibraryDependencyCollector([context]).collectLibraryDependencies(); | 32 new LibraryDependencyCollector([context]).collectLibraryDependencies(); |
33 | 33 |
34 // Cycles | 34 // Cycles |
35 expect(libs, contains('/lib1.dart')); | 35 expect(libs, contains('/lib1.dart')); |
36 expect(libs, contains('/lib2.dart')); | 36 expect(libs, contains('/lib2.dart')); |
37 // Regular sourcs | 37 // Regular sources |
38 expect(libs, contains('/lib3.dart')); | 38 expect(libs, contains('/lib3.dart')); |
39 expect(libs, contains('/lib4.dart')); | 39 expect(libs, contains('/lib4.dart')); |
40 // Non-source, referenced by source | 40 // Non-source, referenced by source |
41 expect(libs, contains('/lib5.dart')); | 41 expect(libs, contains('/lib5.dart')); |
42 // Non-source, referenced by non-source | 42 // Non-source, referenced by non-source |
43 expect(libs, contains('/lib6.dart')); | 43 expect(libs, contains('/lib6.dart')); |
44 } | 44 } |
45 | 45 |
46 test_PackageMaps() { | 46 test_PackageMaps() { |
47 //TODO(pquitslund): add test | 47 //TODO(pquitslund): add test |
48 } | 48 } |
49 | 49 |
50 void _performAnalysis() { | 50 void _performAnalysis() { |
51 while (context.performAnalysisTask().hasMoreWork); | 51 while (context.performAnalysisTask().hasMoreWork); |
52 } | 52 } |
53 } | 53 } |
OLD | NEW |