| Index: pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_test.dart b/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| index 5b4f8edf155dc95b2c6e273a61de973a20e63b58..5013a150b86ee35804d4ef3d5d497049e765add2 100644
|
| --- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| +++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
|
| @@ -1212,7 +1212,7 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
|
| @reflectiveTest
|
| class ResynthesizeElementTest extends ResynthesizeTest {
|
| @override
|
| - void checkLibrary(String text,
|
| + LibraryElementImpl checkLibrary(String text,
|
| {bool allowErrors: false, bool dumpSummaries: false}) {
|
| Source source = addTestSource(text);
|
| LibraryElementImpl original = context.computeLibraryElement(source);
|
| @@ -1222,6 +1222,7 @@ class ResynthesizeElementTest extends ResynthesizeTest {
|
| source.uri.toString(),
|
| original);
|
| checkLibraryElements(original, resynthesized);
|
| + return resynthesized;
|
| }
|
|
|
| @override
|
| @@ -1317,7 +1318,7 @@ class ResynthesizeElementTest extends ResynthesizeTest {
|
|
|
| @reflectiveTest
|
| abstract class ResynthesizeTest extends AbstractResynthesizeTest {
|
| - void checkLibrary(String text,
|
| + LibraryElementImpl checkLibrary(String text,
|
| {bool allowErrors: false, bool dumpSummaries: false});
|
|
|
| /**
|
| @@ -3165,6 +3166,18 @@ get x => null;''');
|
| checkLibrary('import "a.dart" as a; a.C c;');
|
| }
|
|
|
| + test_import_self() {
|
| + LibraryElementImpl resynthesized = checkLibrary('''
|
| +import 'test.dart' as p;
|
| +class C {}
|
| +class D extends p.C {} // Prevent "unused import" warning
|
| +''');
|
| + expect(resynthesized.imports, hasLength(2));
|
| + expect(resynthesized.imports[0].importedLibrary.location,
|
| + resynthesized.location);
|
| + expect(resynthesized.imports[1].importedLibrary.isDartCore, true);
|
| + }
|
| +
|
| test_import_show() {
|
| addLibrary('dart:async');
|
| checkLibrary('''
|
|
|