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

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

Issue 1829463002: Issue 26063. Index declarations in even partically analyzed units. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 9 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/index_unit.dart ('k') | pkg/analyzer/tool/summary/build_sdk_summaries.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/test/src/summary/index_unit_test.dart
diff --git a/pkg/analyzer/test/src/summary/index_unit_test.dart b/pkg/analyzer/test/src/summary/index_unit_test.dart
index f9639e260e387248e927c08e74de593414d6ccbf..cb18d02233e3d2a8ab4e3372974c29f47b9110a6 100644
--- a/pkg/analyzer/test/src/summary/index_unit_test.dart
+++ b/pkg/analyzer/test/src/summary/index_unit_test.dart
@@ -99,6 +99,11 @@ class A {
_assertDefinedName('A', IndexNameKind.topLevel, 'A {}');
}
+ void test_definedName_topLevel_class2() {
+ _indexTestUnit('class A {}', declOnly: true);
+ _assertDefinedName('A', IndexNameKind.topLevel, 'A {}');
+ }
+
void test_definedName_topLevel_classAlias() {
_indexTestUnit('''
class M {}
@@ -1169,10 +1174,14 @@ main() {
return _getStringId(str);
}
- void _indexTestUnit(String code) {
+ void _indexTestUnit(String code, {bool declOnly: false}) {
resolveTestUnit(code);
PackageIndexAssembler assembler = new PackageIndexAssembler();
- assembler.index(testUnit);
+ if (declOnly) {
+ assembler.indexDeclarations(testUnit);
+ } else {
+ assembler.indexUnit(testUnit);
+ }
// assemble, write and read
PackageIndexBuilder indexBuilder = assembler.assemble();
List<int> indexBytes = indexBuilder.toBuffer();
« no previous file with comments | « pkg/analyzer/lib/src/summary/index_unit.dart ('k') | pkg/analyzer/tool/summary/build_sdk_summaries.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698