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

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

Issue 1714173002: Add summary support for ShowElementCombinator.end and .offset. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/summary_common.dart
diff --git a/pkg/analyzer/test/src/summary/summary_common.dart b/pkg/analyzer/test/src/summary/summary_common.dart
index 8b53487b6ba1e458ee4a5a714ba0392ba02cc591..162a9521d957d1f5573e33bd0e5c1a53e484c669 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -4889,6 +4889,9 @@ f(MyFunction myFunction) {}
'Future');
expect(unlinkedUnits[0].publicNamespace.exports[0].combinators[0].hides[1],
'Stream');
+ expect(
+ unlinkedUnits[0].publicNamespace.exports[0].combinators[0].offset, 0);
+ expect(unlinkedUnits[0].publicNamespace.exports[0].combinators[0].end, 0);
expect(linked.exportNames, isNotEmpty);
}
@@ -4981,7 +4984,8 @@ f(MyFunction myFunction) {}
}
test_export_show_order() {
- serializeLibraryText('export "dart:async" show Future, Stream;');
+ String libraryText = 'export "dart:async" show Future, Stream;';
+ serializeLibraryText(libraryText);
expect(unlinkedUnits[0].publicNamespace.exports, hasLength(1));
expect(
unlinkedUnits[0].publicNamespace.exports[0].combinators, hasLength(1));
@@ -4993,6 +4997,10 @@ f(MyFunction myFunction) {}
'Future');
expect(unlinkedUnits[0].publicNamespace.exports[0].combinators[0].shows[1],
'Stream');
+ expect(unlinkedUnits[0].publicNamespace.exports[0].combinators[0].offset,
+ libraryText.indexOf('show'));
+ expect(unlinkedUnits[0].publicNamespace.exports[0].combinators[0].end,
+ libraryText.indexOf(';'));
}
test_export_typedef() {
@@ -5327,6 +5335,8 @@ get f => null;''';
expect(unlinkedUnits[0].imports[0].combinators[0].hides, hasLength(2));
expect(unlinkedUnits[0].imports[0].combinators[0].hides[0], 'Future');
expect(unlinkedUnits[0].imports[0].combinators[0].hides[1], 'Stream');
+ expect(unlinkedUnits[0].imports[0].combinators[0].offset, 0);
+ expect(unlinkedUnits[0].imports[0].combinators[0].end, 0);
}
test_import_implicit() {
@@ -5519,6 +5529,10 @@ p.B b;
expect(unlinkedUnits[0].imports[0].combinators[0].hides, isEmpty);
expect(unlinkedUnits[0].imports[0].combinators[0].shows[0], 'Future');
expect(unlinkedUnits[0].imports[0].combinators[0].shows[1], 'Stream');
+ expect(unlinkedUnits[0].imports[0].combinators[0].offset,
+ libraryText.indexOf('show'));
+ expect(unlinkedUnits[0].imports[0].combinators[0].end,
+ libraryText.indexOf('; Future'));
}
test_import_uri() {
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698