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

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

Issue 315183004: Remove unused analysis contexts (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 6 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_directory_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_directory_manager_test.dart
diff --git a/pkg/analysis_server/test/context_directory_manager_test.dart b/pkg/analysis_server/test/context_directory_manager_test.dart
index 283dd63d277d55679afcd3b0b7f54d97db76c123..0bebce08a6586ddfba987b4922b0a4744c26639e 100644
--- a/pkg/analysis_server/test/context_directory_manager_test.dart
+++ b/pkg/analysis_server/test/context_directory_manager_test.dart
@@ -21,9 +21,10 @@ class TestContextDirectoryManager extends ContextDirectoryManager {
@override
void addContext(Folder folder, File pubspecFile) {
- currentContextPaths.add(folder.path);
- currentContextPubspecPaths[folder.path] = pubspecFile != null ? pubspecFile.path : null;
- currentContextFilePaths[folder.path] = new Set<String>();
+ String path = folder.path;
+ currentContextPaths.add(path);
+ currentContextPubspecPaths[path] = pubspecFile != null ? pubspecFile.path : null;
+ currentContextFilePaths[path] = new Set<String>();
}
@override
@@ -39,6 +40,14 @@ class TestContextDirectoryManager extends ContextDirectoryManager {
}
// TODO(paulberry): handle source.changedSources.
}
+
+ @override
+ void removeContext(Folder folder) {
+ String path = folder.path;
+ currentContextPaths.remove(path);
+ currentContextPubspecPaths.remove(path);
+ currentContextFilePaths.remove(path);
+ }
}
main() {
« no previous file with comments | « pkg/analysis_server/lib/src/context_directory_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698