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

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

Issue 2231473002: Revert 6ad38498c8673f1fbe3e12c49b1cf590305676dd (PARSED_UNIT). (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 3d212b232a249c7224fd9a31fafcd21397a51dc4..79f307183c35e9f10330bc284c5a53ecc8de8ab6 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_UNIT1, AstFactory.compilationUnit(), []);
+ entry1.setValue(PARSED_UNIT, 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_UNIT1), CacheState.VALID);
+ expect(entry1.getState(PARSED_UNIT), 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,9 +571,7 @@ class DartWorkManagerTest {
void test_onSourceFactoryChanged() {
when(context.exists(anyObject)).thenReturn(true);
// set cache values
- CompilationUnit unit = AstFactory.compilationUnit();
- entry1.setValue(PARSED_UNIT1, unit, []);
- entry1.setValue(PARSED_UNIT, unit, []);
+ entry1.setValue(PARSED_UNIT, AstFactory.compilationUnit(), []);
entry1.setValue(IMPORTED_LIBRARIES, <Source>[], []);
entry1.setValue(EXPLICITLY_IMPORTED_LIBRARIES, <Source>[], []);
entry1.setValue(EXPORTED_LIBRARIES, <Source>[], []);
@@ -591,7 +589,6 @@ 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);
@@ -639,7 +636,7 @@ class DartWorkManagerTest {
entry1.setValue(PARSE_ERRORS, <AnalysisError>[error2], []);
// PARSED_UNIT is ready, set errors
manager
- .resultsComputed(source1, {PARSED_UNIT1: AstFactory.compilationUnit()});
+ .resultsComputed(source1, {PARSED_UNIT: AstFactory.compilationUnit()});
// all of the errors are included
ChangeNoticeImpl notice = context.getNotice(source1);
expect(notice.errors, unorderedEquals([error1, error2]));
@@ -724,7 +721,7 @@ class DartWorkManagerTest {
.thenReturn(new AnalysisErrorInfoImpl([], lineInfo));
entry1.setValue(LINE_INFO, lineInfo, []);
CompilationUnit unit = AstFactory.compilationUnit();
- manager.resultsComputed(source1, {PARSED_UNIT1: unit});
+ manager.resultsComputed(source1, {PARSED_UNIT: 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