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

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

Issue 2526063002: Add parser support for using a URI in a part-of directive (Closed)
Patch Set: Created 4 years, 1 month 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/parser_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 8e522b8bcc8148fcd0c656e84adae069686f6491..40419616f707c0661917e9b087f68b6cbc52d19a 100644
--- a/pkg/analyzer/test/src/task/dart_test.dart
+++ b/pkg/analyzer/test/src/task/dart_test.dart
@@ -797,6 +797,7 @@ class BuildLibraryElementTaskTest extends _AbstractDartTaskTest {
LibraryElement libraryElement;
test_perform() {
+ enableUriInPartOf();
_performBuildTask({
'/lib.dart': '''
library lib;
@@ -807,7 +808,7 @@ part 'part2.dart';
part of lib;
''',
'/part2.dart': '''
-part of lib;
+part of 'lib.dart';
'''
});
expect(outputs, hasLength(3));
@@ -5648,6 +5649,16 @@ class _AbstractDartTaskTest extends AbstractContextTest {
context.analysisOptions = options;
}
+ /**
+ * Enable the use of URIs in part-of directives in the current analysis
+ * context.
+ */
+ void enableUriInPartOf() {
+ AnalysisOptionsImpl options = context.analysisOptions;
+ options.enableUriInPartOf = true;
+ context.analysisOptions = options;
+ }
+
void setUp() {
super.setUp();
emptySource = newSource('/test.dart');
« no previous file with comments | « pkg/analyzer/test/generated/parser_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698