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

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

Issue 1920993002: Support for replacing of the context folder. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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
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 123cabe93f9b0e5e4611b9e556700471c40e97d6..d20e5994d4469750e4ba4109b64bb13f2f458af7 100644
--- a/pkg/analysis_server/test/context_manager_test.dart
+++ b/pkg/analysis_server/test/context_manager_test.dart
@@ -2373,6 +2373,11 @@ class TestContextManagerCallbacks extends ContextManagerCallbacks {
*/
final ResourceProvider resourceProvider;
+ /**
+ * The list of `flushedFiles` in the last [removeContext] invocation.
+ */
+ List<String> lastFlushedFiles;
+
TestContextManagerCallbacks(this.resourceProvider);
/**
@@ -2448,12 +2453,28 @@ class TestContextManagerCallbacks extends ContextManagerCallbacks {
}
@override
+ void moveContext(Folder from, Folder to) {
+ String path = from.path;
+ String path2 = to.path;
+ expect(currentContextFilePaths, contains(path));
+ expect(currentContextTimestamps, contains(path));
+ expect(currentContextSources, contains(path));
+ expect(currentContextFilePaths, isNot(contains(path2)));
+ expect(currentContextTimestamps, isNot(contains(path2)));
+ expect(currentContextSources, isNot(contains(path2)));
+ currentContextFilePaths[path2] = currentContextFilePaths.remove(path);
+ currentContextTimestamps[path2] = currentContextTimestamps.remove(path);
+ currentContextSources[path2] = currentContextSources.remove(path);
+ }
+
+ @override
void removeContext(Folder folder, List<String> flushedFiles) {
String path = folder.path;
expect(currentContextPaths, contains(path));
currentContextTimestamps.remove(path);
currentContextFilePaths.remove(path);
currentContextSources.remove(path);
+ lastFlushedFiles = flushedFiles;
}
@override
« no previous file with comments | « pkg/analysis_server/lib/src/single_context_manager.dart ('k') | pkg/analysis_server/test/single_context_manager_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698