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

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

Issue 1183773002: Add self-reference sources into INCLUDED_PARTS. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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/test/generated/compile_time_error_code_test.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 29ccfee3da5aeb6b6e2bdd465d4e6dd2f233030f..096ca3d75193d9a58a93b71c35d9ce4320025602 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -2177,6 +2177,8 @@ class LibraryUnitErrorsTaskTest extends _AbstractDartTaskTest {
@reflectiveTest
class ParseDartTaskTest extends _AbstractDartTaskTest {
+ Source source;
+
test_buildInputs() {
Map<String, TaskInput> inputs = ParseDartTask.buildInputs(emptySource);
expect(inputs, isNotNull);
@@ -2292,6 +2294,14 @@ class A {''');
expect(outputs[UNITS], hasLength(2));
}
+ test_perform_library_selfReferenceAsPart() {
+ _performParseTask(r'''
+library lib;
+part 'test.dart';
+''');
+ expect(outputs[INCLUDED_PARTS], unorderedEquals(<Source>[source]));
+ }
+
test_perform_part() {
_performParseTask(r'''
part of lib;
@@ -2308,8 +2318,8 @@ class B {}''');
}
void _performParseTask(String content) {
- AnalysisTarget target = newSource('/test.dart', content);
- computeResult(target, PARSED_UNIT);
+ source = newSource('/test.dart', content);
+ computeResult(source, PARSED_UNIT);
expect(task, new isInstanceOf<ParseDartTask>());
}
« no previous file with comments | « pkg/analyzer/test/generated/compile_time_error_code_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698