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

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

Issue 1154033002: Schedule ChangeNotice results only after parse/resolve/errors. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 eb885df0aaad30ed3a82c00d84ba2b2c8d334583..9fbc49b83b0b30a036f89cbc7046576816d573f3 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -415,8 +415,9 @@ class DartWorkManagerTest {
AnalysisTarget unitTarget = new LibrarySpecificUnit(source2, source1);
context.getCacheEntry(unitTarget).setValue(
VERIFY_ERRORS, <AnalysisError>[error2], []);
- // notify about LibrarySpecificUnit specific errors
- manager.resultsComputed(unitTarget, {VERIFY_ERRORS: []});
+ // RESOLVED_UNIT is ready, set errors
+ manager.resultsComputed(
+ unitTarget, {RESOLVED_UNIT: AstFactory.compilationUnit()});
// all of the errors are included
ChangeNoticeImpl notice = context.getNotice(source1);
expect(notice.errors, unorderedEquals([error1, error2]));
@@ -432,11 +433,10 @@ class DartWorkManagerTest {
LineInfo lineInfo = new LineInfo([0]);
entry1.setValue(LINE_INFO, lineInfo, []);
entry1.setValue(SCAN_ERRORS, <AnalysisError>[error1], []);
- AnalysisTarget unitTarget = new LibrarySpecificUnit(source2, source1);
- context.getCacheEntry(unitTarget).setValue(
- VERIFY_ERRORS, <AnalysisError>[error2], []);
- // notify about Source specific errors
- manager.resultsComputed(source1, {SCAN_ERRORS: []});
+ entry1.setValue(PARSE_ERRORS, <AnalysisError>[error2], []);
+ // PARSED_UNIT is ready, set errors
+ manager.resultsComputed(
+ source1, {PARSED_UNIT: AstFactory.compilationUnit()});
// all of the errors are included
ChangeNoticeImpl notice = context.getNotice(source1);
expect(notice.errors, unorderedEquals([error1, error2]));
« 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