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

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

Issue 1179253002: Mix VARIABLE_REFERENCE_ERRORS into the full errors list on ChangeNotice. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Return DART_ERRORS from getErrors() when valid. Created 5 years, 6 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 414a0fa8ee1196adf74b2e47f89343193f79c068..fdff1c3050297c55c80143c0a4422fa44d9a265e 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -307,6 +307,20 @@ class DartWorkManagerTest {
expect(errorInfo.lineInfo, lineInfo);
}
+ void test_getErrors_hasFullList() {
+ AnalysisError error1 =
+ new AnalysisError(source1, 1, 0, ScannerErrorCode.MISSING_DIGIT);
+ AnalysisError error2 =
+ new AnalysisError(source1, 2, 0, ScannerErrorCode.MISSING_DIGIT);
+ when(context.getLibrariesContaining(source1)).thenReturn([source2]);
+ LineInfo lineInfo = new LineInfo([0]);
+ entry1.setValue(LINE_INFO, lineInfo, []);
+ entry1.setValue(DART_ERRORS, <AnalysisError>[error1, error2], []);
+ AnalysisErrorInfo errorInfo = manager.getErrors(source1);
+ expect(errorInfo.errors, unorderedEquals([error1, error2]));
+ expect(errorInfo.lineInfo, lineInfo);
+ }
+
void test_getLibrariesContainingPart() {
Source part1 = new TestSource('part1.dart');
Source part2 = new TestSource('part2.dart');
« 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