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

Unified Diff: pkg/analyzer/test/src/summary/resynthesize_test.dart

Issue 2226613004: Suppress follow-on errors when a file is imported with either a prefix or a show clause (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cache URI existence in a modifier' Created 4 years, 4 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
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 b6e8b30b35505b17ff7e91baf3c6b6755e0420d1..679741df4d764db3bace0143f962ec7f7f31167e 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -107,14 +107,16 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
expect(resynthesized.imports.length, original.imports.length,
reason: 'imports');
for (int i = 0; i < resynthesized.imports.length; i++) {
- compareImportElements(resynthesized.imports[i], original.imports[i],
- 'import ${original.imports[i].uri}');
+ ImportElement originalImport = original.imports[i];
+ compareImportElements(
+ resynthesized.imports[i], originalImport, originalImport.toString());
}
expect(resynthesized.exports.length, original.exports.length,
reason: 'exports');
for (int i = 0; i < resynthesized.exports.length; i++) {
- compareExportElements(resynthesized.exports[i], original.exports[i],
- 'export ${original.exports[i].uri}');
+ ExportElement originalExport = original.exports[i];
+ compareExportElements(
+ resynthesized.exports[i], originalExport, originalExport.toString());
}
expect(resynthesized.nameLength, original.nameLength);
compareNamespaces(resynthesized.publicNamespace, original.publicNamespace,
@@ -1164,6 +1166,7 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
}
return new LinkedLibrary.fromBuffer(serialized.linked.toBuffer());
}
+
Map<String, LinkedLibrary> linkedSummaries = <String, LinkedLibrary>{
library.source.uri.toString(): getLinkedSummaryFor(library)
};
@@ -1328,6 +1331,13 @@ abstract class AbstractResynthesizeTest extends AbstractSingleUnitTest {
return false;
} else if (modifier == Modifier.SYNTHETIC) {
return element.isSynthetic;
+ } else if (modifier == Modifier.URI_EXISTS) {
+ if (element is ExportElement) {
+ return element.uriExists;
+ } else if (element is ImportElement) {
+ return element.uriExists;
+ }
+ return false;
}
throw new UnimplementedError(
'Modifier $modifier for ${element?.runtimeType}');
@@ -1394,6 +1404,7 @@ class ResynthesizeElementTest extends ResynthesizeTest {
}
return new LinkedLibrary.fromBuffer(serialized.linked.toBuffer());
}
+
Map<String, LinkedLibrary> linkedSummaries = <String, LinkedLibrary>{
library.source.uri.toString(): getLinkedSummaryFor(library)
};
« pkg/analyzer/lib/src/dart/element/builder.dart ('K') | « pkg/analyzer/test/src/context/mock_sdk.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698