| 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);
|
|
|