| Index: pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| index c7c4c895252bf5b033439c781398343b2087cb29..7fc34dbb3432186f512a6ac40af81e867df9bb3d 100644
|
| --- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| +++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
|
| @@ -273,7 +273,6 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
|
| void compareCompilationUnitElements(CompilationUnitElementImpl resynthesized,
|
| CompilationUnitElementImpl original) {
|
| String desc = 'Compilation unit ${original.source.uri}';
|
| - compareUriReferencedElements(resynthesized, original, desc);
|
| expect(resynthesized.source, original.source);
|
| expect(resynthesized.librarySource, original.librarySource);
|
| compareLineInfo(resynthesized.lineInfo, original.lineInfo);
|
| @@ -763,7 +762,6 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
|
|
|
| void compareExportElements(ExportElementImpl resynthesized,
|
| ExportElementImpl original, String desc) {
|
| - compareUriReferencedElements(resynthesized, original, desc);
|
| expect(resynthesized.exportedLibrary.location,
|
| original.exportedLibrary.location);
|
| expect(resynthesized.combinators.length, original.combinators.length);
|
| @@ -845,7 +843,6 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
|
|
|
| void compareImportElements(ImportElementImpl resynthesized,
|
| ImportElementImpl original, String desc) {
|
| - compareUriReferencedElements(resynthesized, original, desc);
|
| expect(resynthesized.importedLibrary.location,
|
| original.importedLibrary.location,
|
| reason: '$desc importedLibrary location');
|
| @@ -1149,15 +1146,6 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
|
| }
|
| }
|
|
|
| - void compareUriReferencedElements(UriReferencedElementImpl resynthesized,
|
| - UriReferencedElementImpl original, String desc) {
|
| - compareElements(resynthesized, original, desc);
|
| - expect(resynthesized.uri, original.uri, reason: '$desc.uri');
|
| - expect(resynthesized.uriOffset, original.uriOffset,
|
| - reason: '$desc.uriOffset');
|
| - expect(resynthesized.uriEnd, original.uriEnd, reason: '$desc.uriEnd');
|
| - }
|
| -
|
| void compareVariableElements(
|
| VariableElement resynthesized, VariableElement original, String desc) {
|
| compareElements(resynthesized, original, desc);
|
| @@ -6396,7 +6384,6 @@ export 'foo.dart';
|
| export 'foo.dart';
|
| ''');
|
| }
|
| - expect(library.exports[0].uri, 'foo.dart');
|
| expect(library.exports[0].exportedLibrary.source.shortName, 'foo.dart');
|
| }
|
|
|
| @@ -6420,7 +6407,6 @@ export 'foo_io.dart';
|
| export 'foo_io.dart';
|
| ''');
|
| }
|
| - expect(library.exports[0].uri, 'foo_io.dart');
|
| expect(library.exports[0].exportedLibrary.source.shortName, 'foo_io.dart');
|
| }
|
|
|
| @@ -6445,7 +6431,6 @@ export 'foo_html.dart';
|
| ''');
|
| }
|
| ExportElement export = library.exports[0];
|
| - expect(export.uri, 'foo_html.dart');
|
| expect(export.exportedLibrary.source.shortName, 'foo_html.dart');
|
| }
|
|
|
| @@ -7816,13 +7801,13 @@ import '';
|
| checkElementText(library, r'''
|
| @
|
| foo/*location: null*/
|
| -import '';
|
| +import '<unresolved>';
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| @
|
| foo/*location: null*/
|
| -import '';
|
| +import '<unresolved>';
|
| ''');
|
| }
|
| }
|
| @@ -7899,12 +7884,12 @@ class D extends C {
|
| var library = await checkLibrary('import "/a.dart"; C c;');
|
| if (isStrongMode) {
|
| checkElementText(library, r'''
|
| -import '/a.dart';
|
| +import 'a.dart';
|
| C c;
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| -import '/a.dart';
|
| +import 'a.dart';
|
| C c;
|
| ''');
|
| }
|
| @@ -8911,7 +8896,7 @@ class B extends A {}
|
| ''');
|
| if (isStrongMode) {
|
| checkElementText(library, r'''
|
| -part '';
|
| +part '<unresolved>';
|
| class B {
|
| }
|
| --------------------
|
| @@ -8920,7 +8905,7 @@ unit: null
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| -part '';
|
| +part '<unresolved>';
|
| class B {
|
| }
|
| --------------------
|
| @@ -8950,46 +8935,20 @@ part '[invalid uri]';
|
| part 'a3.dart';
|
| part '[invalid uri]';
|
| ''');
|
| - if (isStrongMode) {
|
| - checkElementText(library, r'''
|
| -import '[invalid uri]';
|
| -import '[invalid uri]:foo.dart';
|
| -import 'a1.dart';
|
| -import '[invalid uri]';
|
| -import '[invalid uri]:foo.dart';
|
| -export '[invalid uri]';
|
| -export '[invalid uri]:foo.dart';
|
| -export 'a2.dart';
|
| -export '[invalid uri]';
|
| -export '[invalid uri]:foo.dart';
|
| -part '[invalid uri]';
|
| -part 'a3.dart';
|
| -part '[invalid uri]';
|
| ---------------------
|
| -unit: null
|
| -
|
| ---------------------
|
| -unit: a3.dart
|
| -
|
| ---------------------
|
| -unit: null
|
| -
|
| -''');
|
| - } else {
|
| - checkElementText(library, r'''
|
| -import '[invalid uri]';
|
| -import '[invalid uri]:foo.dart';
|
| + checkElementText(library, r'''
|
| +import '<unresolved>';
|
| +import '<unresolved>';
|
| import 'a1.dart';
|
| -import '[invalid uri]';
|
| -import '[invalid uri]:foo.dart';
|
| -export '[invalid uri]';
|
| -export '[invalid uri]:foo.dart';
|
| +import '<unresolved>';
|
| +import '<unresolved>';
|
| +export '<unresolved>';
|
| +export '<unresolved>';
|
| export 'a2.dart';
|
| -export '[invalid uri]';
|
| -export '[invalid uri]:foo.dart';
|
| -part '[invalid uri]';
|
| +export '<unresolved>';
|
| +export '<unresolved>';
|
| +part '<unresolved>';
|
| part 'a3.dart';
|
| -part '[invalid uri]';
|
| +part '<unresolved>';
|
| --------------------
|
| unit: null
|
|
|
| @@ -9000,7 +8959,6 @@ unit: a3.dart
|
| unit: null
|
|
|
| ''');
|
| - }
|
| }
|
|
|
| test_library() async {
|
| @@ -11059,7 +11017,7 @@ unit: b.dart
|
| if (isStrongMode) {
|
| checkElementText(library, r'''
|
| library my.lib;
|
| -part 'foo/';
|
| +part '<unresolved>';
|
| --------------------
|
| unit: null
|
|
|
| @@ -11067,7 +11025,7 @@ unit: null
|
| } else {
|
| checkElementText(library, r'''
|
| library my.lib;
|
| -part 'foo/';
|
| +part '<unresolved>';
|
| --------------------
|
| unit: null
|
|
|
| @@ -11086,7 +11044,7 @@ part "${foo}/bar.dart";
|
| if (isStrongMode) {
|
| checkElementText(library, r'''
|
| library my.lib;
|
| -part '';
|
| +part '<unresolved>';
|
| --------------------
|
| unit: null
|
|
|
| @@ -11094,7 +11052,7 @@ unit: null
|
| } else {
|
| checkElementText(library, r'''
|
| library my.lib;
|
| -part '';
|
| +part '<unresolved>';
|
| --------------------
|
| unit: null
|
|
|
| @@ -11888,14 +11846,14 @@ F f;
|
| var library = await checkLibrary('import "a/a.dart"; C c; E e; F f;');
|
| if (isStrongMode) {
|
| checkElementText(library, r'''
|
| -import 'a/a.dart';
|
| +import 'a.dart';
|
| C c;
|
| E e;
|
| F f;
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| -import 'a/a.dart';
|
| +import 'a.dart';
|
| C c;
|
| E e;
|
| F f;
|
| @@ -11909,14 +11867,14 @@ F f;
|
| var library = await checkLibrary('import "a/a.dart"; C c; E e; F f;');
|
| if (isStrongMode) {
|
| checkElementText(library, r'''
|
| -import 'a/a.dart';
|
| +import 'a.dart';
|
| C c;
|
| E e;
|
| F f;
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| -import 'a/a.dart';
|
| +import 'a.dart';
|
| C c;
|
| E e;
|
| F f;
|
| @@ -11971,14 +11929,14 @@ C2 c2;
|
| var library = await checkLibrary('import "a/b.dart"; C c; E e; F f;');
|
| if (isStrongMode) {
|
| checkElementText(library, r'''
|
| -import 'a/b.dart';
|
| +import 'b.dart';
|
| C c;
|
| E e;
|
| F f;
|
| ''');
|
| } else {
|
| checkElementText(library, r'''
|
| -import 'a/b.dart';
|
| +import 'b.dart';
|
| C c;
|
| E e;
|
| F f;
|
|
|