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'); |