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

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

Issue 1915033005: Make reference 0 consistent between AST-based and element-based summaries. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 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/lib/src/summary/summarize_elements.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 a44ce9a1f6a596b16cd99e13115f68b04f28d2c4..64ddf1a8b3222f48c31365465400cbacb8193a38 100644
--- a/pkg/analyzer/test/src/summary/summary_common.dart
+++ b/pkg/analyzer/test/src/summary/summary_common.dart
@@ -8259,6 +8259,23 @@ f(x) => 42;
expect(unlinkedUnits[1].publicNamespace.names[0].name, 'C');
}
+ test_reference_zero() {
+ // Element zero of the references table should be populated in a standard
+ // way.
+ serializeLibraryText('');
+ UnlinkedReference unlinkedReference0 = unlinkedUnits[0].references[0];
+ expect(unlinkedReference0.name, '');
+ expect(unlinkedReference0.prefixReference, 0);
+ LinkedReference linkedReference0 = linked.units[0].references[0];
+ expect(linkedReference0.containingReference, 0);
+ expect(linkedReference0.dependency, 0);
+ expect(linkedReference0.kind, ReferenceKind.unresolved);
+ expect(linkedReference0.localIndex, 0);
+ expect(linkedReference0.name, '');
+ expect(linkedReference0.numTypeParameters, 0);
+ expect(linkedReference0.unit, 0);
+ }
+
test_setter_documented() {
String text = '''
// Extra comment so doc comment offset != 0
« no previous file with comments | « pkg/analyzer/lib/src/summary/summarize_elements.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698