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

Unified Diff: pkg/analyzer/test/src/task/dart_work_manager_test.dart

Issue 2155023002: Don't schedule SOURCE_KIND computation when it is know already. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 5 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/analyzer/lib/src/task/dart_work_manager.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/task/dart_work_manager_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_work_manager_test.dart b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
index da36f879b9f848511dccd4b3e71d8d7bd920ad8f..31ee542dea4f118a85f0aab6732416b633870fe5 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -106,6 +106,21 @@ class DartWorkManagerTest {
expect_unknownSourceQueue([source4, source1]);
}
+ /**
+ * When we perform limited invalidation, we keep [SOURCE_KIND] valid. So, we
+ * don't need to put such sources into [DartWorkManager.unknownSourceQueue],
+ * and remove from [DartWorkManager.librarySourceQueue].
+ */
+ void test_applyChange_change_hasSourceKind() {
+ entry1.setValue(SOURCE_KIND, SourceKind.LIBRARY, []);
+ manager.librarySourceQueue.addAll([source1, source2]);
+ manager.unknownSourceQueue.addAll([source3]);
+ // change source1
+ manager.applyChange([], [source1, source2], []);
+ expect_librarySourceQueue([source1]);
+ expect_unknownSourceQueue([source2, source3]);
+ }
+
void test_applyChange_remove() {
manager.librarySourceQueue.addAll([source1, source3]);
manager.unknownSourceQueue.addAll([source4]);
« no previous file with comments | « pkg/analyzer/lib/src/task/dart_work_manager.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698