Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(504)

Side by Side Diff: pkg/analysis_server/test/services/dependencies/library_dependencies_test.dart

Issue 3003173002: Remove more references to AnalysisContext (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // BSD-style license that can be found in the LICENSE file.
4
5 import 'package:analysis_server/src/services/dependencies/library_dependencies.d art';
6 import 'package:test/test.dart';
7 import 'package:test_reflective_loader/test_reflective_loader.dart';
8
9 import '../../abstract_context.dart';
10
11 main() {
12 defineReflectiveSuite(() {
13 defineReflectiveTests(LibraryDependenciesTest);
14 });
15 }
16
17 @reflectiveTest
18 class LibraryDependenciesTest extends AbstractContextTest {
19 @failingTest
20 test_LibraryDependencies() {
21 // See https://github.com/dart-lang/sdk/issues/29310
22 addSource('/lib1.dart', 'import "lib2.dart";');
23 addSource('/lib2.dart', 'import "lib1.dart";');
24 addSource('/lib3.dart', 'import "lib2.dart";');
25 addSource('/lib4.dart', 'import "lib5.dart";');
26 provider.newFile('/lib5.dart', 'import "lib6.dart";');
27 provider.newFile('/lib6.dart', '');
28
29 var libs = new LibraryDependencyCollector([]).collectLibraryDependencies();
30
31 // Cycles
32 expect(libs, contains('/lib1.dart'));
33 expect(libs, contains('/lib2.dart'));
34 // Regular sources
35 expect(libs, contains('/lib3.dart'));
36 expect(libs, contains('/lib4.dart'));
37 // Non-source, referenced by source
38 expect(libs, contains('/lib5.dart'));
39 // Non-source, referenced by non-source
40 expect(libs, contains('/lib6.dart'));
41 }
42
43 test_PackageMaps() {
44 //TODO(pquitslund): add test
45 }
46 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698