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

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

Issue 1565283002: Add uriOffset and uriEnd to the summary. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 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 33dff3b18ca9b2bcea61217af4a5d304b88870e5..09c24731d850db28d9d967367e642c9a30545c72 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -55,7 +55,7 @@ class ResynthTest extends ResolverTestCase {
expect(resynthesized.imports.length, original.imports.length);
for (int i = 0; i < resynthesized.imports.length; i++) {
compareImportElements(resynthesized.imports[i], original.imports[i],
- 'import ${original.imports[i].name}');
+ 'import ${original.imports[i].uri}');
}
expect(resynthesized.exports.length, original.exports.length);
for (int i = 0; i < resynthesized.exports.length; i++) {
@@ -128,7 +128,8 @@ class ResynthTest extends ResolverTestCase {
void compareCompilationUnitElements(CompilationUnitElementImpl resynthesized,
CompilationUnitElementImpl original) {
- compareUriReferencedElements(resynthesized, original, '(compilation unit)');
+ String desc = 'Compilation unit ${original.source.uri}';
+ compareUriReferencedElements(resynthesized, original, desc);
expect(resynthesized.source, original.source);
expect(resynthesized.librarySource, original.librarySource);
expect(resynthesized.types.length, original.types.length);
@@ -442,6 +443,8 @@ class ResynthTest extends ResolverTestCase {
UriReferencedElementImpl original, String desc) {
compareElements(resynthesized, original, desc);
expect(resynthesized.uri, original.uri);
+ expect(resynthesized.uriOffset, original.uriOffset, reason: desc);
+ expect(resynthesized.uriEnd, original.uriEnd, reason: desc);
}
void compareVariableElements(VariableElementImpl resynthesized,
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | pkg/analyzer/test/src/summary/summary_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698