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

Unified Diff: pkg/analyzer/test/generated/all_the_rest_test.dart

Issue 1364853007: Issue 24440. Fix for renaming libraries using 'part of' directives. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 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/generated/ast.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/generated/all_the_rest_test.dart
diff --git a/pkg/analyzer/test/generated/all_the_rest_test.dart b/pkg/analyzer/test/generated/all_the_rest_test.dart
index e3edac3af9fc41d6614703f8a3f64065a46acfac..d64495a5acbb3b70005216929e4509dce283b361 100644
--- a/pkg/analyzer/test/generated/all_the_rest_test.dart
+++ b/pkg/analyzer/test/generated/all_the_rest_test.dart
@@ -6968,6 +6968,26 @@ void main() {
(obj) => obj is FunctionElement, FunctionElement, element);
}
+ void test_locate_PartOfDirective() {
+ Source librarySource = addNamedSource(
+ '/lib.dart',
+ '''
+library my.lib;
+part 'part.dart';
+''');
+ Source unitSource = addNamedSource(
+ '/part.dart',
+ '''
+part of my.lib;
+''');
+ CompilationUnit unit =
+ analysisContext.resolveCompilationUnit2(unitSource, librarySource);
+ PartOfDirective partOf = unit.directives.first;
+ Element element = ElementLocator.locate(partOf);
+ EngineTestCase.assertInstanceOf(
+ (obj) => obj is LibraryElement, LibraryElement, element);
+ }
+
void test_locate_PostfixExpression() {
AstNode id = _findNodeIn("++", "int addOne(int x) => x++;");
Element element = ElementLocator.locate(id);
« no previous file with comments | « pkg/analyzer/lib/src/generated/ast.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698