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

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

Issue 2229603003: Extract unresolved AST parsing (PARSED_UNIT1) from full parsing, which includes UriBasedDirective(s… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Update task graph. Created 4 years, 4 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/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 79f307183c35e9f10330bc284c5a53ecc8de8ab6..3d212b232a249c7224fd9a31fafcd21397a51dc4 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -527,7 +527,7 @@ class DartWorkManagerTest {
void test_onAnalysisOptionsChanged() {
when(context.exists(anyObject)).thenReturn(true);
// set cache values
- entry1.setValue(PARSED_UNIT, AstFactory.compilationUnit(), []);
+ entry1.setValue(PARSED_UNIT1, AstFactory.compilationUnit(), []);
entry1.setValue(IMPORTED_LIBRARIES, <Source>[], []);
entry1.setValue(EXPLICITLY_IMPORTED_LIBRARIES, <Source>[], []);
entry1.setValue(EXPORTED_LIBRARIES, <Source>[], []);
@@ -543,7 +543,7 @@ class DartWorkManagerTest {
// resolution is invalidated
expect(unitEntry.getState(BUILD_LIBRARY_ERRORS), CacheState.INVALID);
// ...but URIs are still value
- expect(entry1.getState(PARSED_UNIT), CacheState.VALID);
+ expect(entry1.getState(PARSED_UNIT1), CacheState.VALID);
expect(entry1.getState(IMPORTED_LIBRARIES), CacheState.VALID);
expect(entry1.getState(EXPLICITLY_IMPORTED_LIBRARIES), CacheState.VALID);
expect(entry1.getState(EXPORTED_LIBRARIES), CacheState.VALID);
@@ -571,7 +571,9 @@ class DartWorkManagerTest {
void test_onSourceFactoryChanged() {
when(context.exists(anyObject)).thenReturn(true);
// set cache values
- entry1.setValue(PARSED_UNIT, AstFactory.compilationUnit(), []);
+ CompilationUnit unit = AstFactory.compilationUnit();
+ entry1.setValue(PARSED_UNIT1, unit, []);
+ entry1.setValue(PARSED_UNIT, unit, []);
entry1.setValue(IMPORTED_LIBRARIES, <Source>[], []);
entry1.setValue(EXPLICITLY_IMPORTED_LIBRARIES, <Source>[], []);
entry1.setValue(EXPORTED_LIBRARIES, <Source>[], []);
@@ -589,6 +591,7 @@ class DartWorkManagerTest {
// resolution is invalidated
expect(unitEntry.getState(BUILD_LIBRARY_ERRORS), CacheState.INVALID);
// ...and URIs resolution too
+ expect(entry1.getState(PARSED_UNIT1), CacheState.INVALID);
expect(entry1.getState(PARSED_UNIT), CacheState.INVALID);
expect(entry1.getState(IMPORTED_LIBRARIES), CacheState.INVALID);
expect(entry1.getState(EXPLICITLY_IMPORTED_LIBRARIES), CacheState.INVALID);
@@ -636,7 +639,7 @@ class DartWorkManagerTest {
entry1.setValue(PARSE_ERRORS, <AnalysisError>[error2], []);
// PARSED_UNIT is ready, set errors
manager
- .resultsComputed(source1, {PARSED_UNIT: AstFactory.compilationUnit()});
+ .resultsComputed(source1, {PARSED_UNIT1: AstFactory.compilationUnit()});
// all of the errors are included
ChangeNoticeImpl notice = context.getNotice(source1);
expect(notice.errors, unorderedEquals([error1, error2]));
@@ -721,7 +724,7 @@ class DartWorkManagerTest {
.thenReturn(new AnalysisErrorInfoImpl([], lineInfo));
entry1.setValue(LINE_INFO, lineInfo, []);
CompilationUnit unit = AstFactory.compilationUnit();
- manager.resultsComputed(source1, {PARSED_UNIT: unit});
+ manager.resultsComputed(source1, {PARSED_UNIT1: unit});
ChangeNoticeImpl notice = context.getNotice(source1);
expect(notice.parsedDartUnit, unit);
expect(notice.resolvedDartUnit, isNull);
« no previous file with comments | « pkg/analyzer/test/src/task/dart_test.dart ('k') | pkg/analyzer/test/src/task/incremental_element_builder_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698