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

Unified Diff: pkg/analysis_server/test/context_manager_test.dart

Issue 1415713002: Ignore contexts in folders named 'packages' or starting with dot. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/context_manager_test.dart
diff --git a/pkg/analysis_server/test/context_manager_test.dart b/pkg/analysis_server/test/context_manager_test.dart
index db575569b5b5bf94f974e068f3d119a678044bbd..ba768ce84c44c95a2c0445ae32040ea349800d1b 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -937,6 +937,26 @@ test_pack:lib/
_checkPackageMap(projPath, equals(packageMapProvider.packageMap));
}
+ void test_setRoots_noContext_inDotFolder() {
+ String pubspecPath = posix.join(projPath, '.pub', 'pubspec.yaml');
+ resourceProvider.newFile(pubspecPath, 'name: test');
+ manager.setRoots(<String>[projPath], <String>[], <String, String>{});
+ // verify
+ expect(callbacks.currentContextPaths, hasLength(1));
+ expect(callbacks.currentContextPaths, contains(projPath));
+ expect(callbacks.currentContextFilePaths[projPath], hasLength(0));
+ }
+
+ void test_setRoots_noContext_inPackagesFolder() {
+ String pubspecPath = posix.join(projPath, 'packages', 'pubspec.yaml');
+ resourceProvider.newFile(pubspecPath, 'name: test');
+ manager.setRoots(<String>[projPath], <String>[], <String, String>{});
+ // verify
+ expect(callbacks.currentContextPaths, hasLength(1));
+ expect(callbacks.currentContextPaths, contains(projPath));
+ expect(callbacks.currentContextFilePaths[projPath], hasLength(0));
+ }
+
void test_setRoots_packageResolver() {
Uri uri = Uri.parse('package:foo/foo.dart');
Source source = new TestSource();
« no previous file with comments | « pkg/analysis_server/lib/src/context_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698