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

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

Issue 1141953002: Always send errors/lines with parsed/resolved units. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
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 c358f7c5f4f20edc164586abbbdc8f34bece5f02..98720115e4434e6465df79ff8abf2e6b6ec20903 100644
--- a/pkg/analyzer/test/src/task/dart_work_manager_test.dart
+++ b/pkg/analyzer/test/src/task/dart_work_manager_test.dart
@@ -361,20 +361,28 @@ class DartWorkManagerTest {
}
void test_resultsComputed_parsedUnit() {
+ when(context.getLibrariesContaining(source1)).thenReturn([]);
+ LineInfo lineInfo = new LineInfo([0]);
+ entry1.setValue(LINE_INFO, lineInfo, []);
CompilationUnit unit = AstFactory.compilationUnit();
manager.resultsComputed(source1, {PARSED_UNIT: unit});
ChangeNoticeImpl notice = context.getNotice(source1);
expect(notice.parsedDartUnit, unit);
expect(notice.resolvedDartUnit, isNull);
+ expect(notice.lineInfo, lineInfo);
}
void test_resultsComputed_resolvedUnit() {
+ when(context.getLibrariesContaining(source2)).thenReturn([]);
+ LineInfo lineInfo = new LineInfo([0]);
+ entry2.setValue(LINE_INFO, lineInfo, []);
CompilationUnit unit = AstFactory.compilationUnit();
manager.resultsComputed(
new LibrarySpecificUnit(source1, source2), {RESOLVED_UNIT: unit});
ChangeNoticeImpl notice = context.getNotice(source2);
expect(notice.parsedDartUnit, isNull);
expect(notice.resolvedDartUnit, unit);
+ expect(notice.lineInfo, lineInfo);
}
void test_resultsComputed_sourceKind_isLibrary() {
« 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