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

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

Issue 1133703003: Add LIBRARY_ERRORS result. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Replace LIBRARY_ERRORS with the LIBRARY_ERRORS_READY flag. 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.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_test.dart
diff --git a/pkg/analyzer/test/src/task/dart_test.dart b/pkg/analyzer/test/src/task/dart_test.dart
index d48469d000029ca5c5dc0ac84b46b703d860fa01..078367fea67f1573c64b89dd66a8d82a0f185cea 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -41,6 +41,7 @@ main() {
runReflectiveTests(GatherUsedImportedElementsTaskTest);
runReflectiveTests(GatherUsedLocalElementsTaskTest);
runReflectiveTests(GenerateHintsTaskTest);
+ runReflectiveTests(LibraryErrorsReadyTaskTest);
runReflectiveTests(LibraryUnitErrorsTaskTest);
runReflectiveTests(ParseDartTaskTest);
runReflectiveTests(ResolveUnitTypeNamesTaskTest);
@@ -1660,6 +1661,34 @@ f(A a) {
}
@reflectiveTest
+class LibraryErrorsReadyTaskTest extends _AbstractDartTaskTest {
+ test_perform() {
+ Source library = newSource('/lib.dart', r'''
+library lib;
+part 'part1.dart';
+part 'part2.dart';
+X v1;
+''');
+ Source part1 = newSource('/part1.dart', r'''
+part of lib;
+X v2;
+''');
+ Source part2 = newSource('/part2.dart', r'''
+part of lib;
+X v3;
+''');
+ _computeResult(library, LIBRARY_ERRORS_READY);
+ expect(task, new isInstanceOf<LibraryErrorsReadyTask>());
+ expect(outputs, hasLength(1));
+ bool ready = outputs[LIBRARY_ERRORS_READY];
+ expect(ready, isTrue);
+ expect(context.getErrors(library).errors, hasLength(1));
+ expect(context.getErrors(part1).errors, hasLength(1));
+ expect(context.getErrors(part2).errors, hasLength(1));
+ }
+}
+
+@reflectiveTest
class LibraryUnitErrorsTaskTest extends _AbstractDartTaskTest {
test_buildInputs() {
Map<String, TaskInput> inputs = LibraryUnitErrorsTask
« no previous file with comments | « pkg/analyzer/lib/src/task/dart.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698