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

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

Issue 1569033002: Add Element.nameOffset and LibraryElement.nameLength to summaries. (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 49f4b69b5b29ad6d06b637ef3ad62633c88a1683..08f404a4a04413d28d0b8aa6899263c64485e03b 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_test.dart
@@ -61,8 +61,9 @@ class ResynthTest extends ResolverTestCase {
expect(resynthesized.exports.length, original.exports.length);
for (int i = 0; i < resynthesized.exports.length; i++) {
compareExportElements(resynthesized.exports[i], original.exports[i],
- 'export ${original.exports[i].name}');
+ 'export ${original.exports[i].uri}');
}
+ expect(resynthesized.nameLength, original.nameLength);
// TODO(paulberry): test entryPoint, exportNamespace, publicNamespace,
// and metadata.
}
@@ -189,6 +190,7 @@ class ResynthTest extends ResolverTestCase {
expect(resynthesized.kind, original.kind);
expect(resynthesized.location, original.location, reason: desc);
expect(resynthesized.name, original.name);
+ expect(resynthesized.nameOffset, original.nameOffset, reason: desc);
for (Modifier modifier in Modifier.values) {
if (modifier == Modifier.MIXIN) {
// Skipping for now. TODO(paulberry): fix.
@@ -900,6 +902,10 @@ class E {
checkLibrary('');
}
+ test_library_name_with_spaces() {
+ checkLibrary('library foo . bar ;');
+ }
+
test_library_named() {
checkLibrary('library foo.bar;');
}
« 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