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

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

Issue 2353433002: Use configurations and declared variables to select import/export URIs during prelinking. (Closed)
Patch Set: Cache selected URI. Created 4 years, 3 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/summarize_ast_test.dart
diff --git a/pkg/analyzer/test/src/summary/summarize_ast_test.dart b/pkg/analyzer/test/src/summary/summarize_ast_test.dart
index 2871298e9846f27dd12defb2b0e0506d40131893..87fb3493d99745d6ac11bb3bc18e79f250764fa0 100644
--- a/pkg/analyzer/test/src/summary/summarize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/summarize_ast_test.dart
@@ -153,8 +153,12 @@ abstract class LinkedSummarizeAstTest extends SummaryLinkerTest
void serializeLibraryText(String text, {bool allowErrors: false}) {
Map<String, UnlinkedUnitBuilder> uriToUnit = this._filesToLink.uriToUnit;
LinkerInputs linkerInputs = createLinkerInputs(text);
- linked = link(linkerInputs.linkedLibraries, linkerInputs.getDependency,
- linkerInputs.getUnit, strongMode)[linkerInputs.testDartUri.toString()];
+ linked = link(
+ linkerInputs.linkedLibraries,
+ linkerInputs.getDependency,
+ linkerInputs.getUnit,
+ (name) => null,
+ strongMode)[linkerInputs.testDartUri.toString()];
expect(linked, isNotNull);
validateLinkedLibrary(linked);
unlinkedUnits = <UnlinkedUnit>[linkerInputs.unlinkedDefiningUnit];
@@ -203,6 +207,10 @@ class LinkerInputs {
Set<String> get linkedLibraries => _uriToUnit.keys.toSet();
+ String getDeclaredVariable(String name) {
+ return null;
+ }
+
LinkedLibrary getDependency(String absoluteUri) {
Map<String, LinkedLibrary> sdkLibraries =
SerializedMockSdk.instance.uriToLinkedLibrary;
@@ -299,6 +307,7 @@ abstract class SummaryLinkerTest {
linkerInputs.linkedLibraries,
linkerInputs.getDependency,
linkerInputs.getUnit,
+ linkerInputs.getDeclaredVariable,
true);
linkedLibraries.forEach(assembler.addLinkedLibrary);
linkerInputs._uriToUnit.forEach((String uri, UnlinkedUnit unit) {
« no previous file with comments | « pkg/analyzer/test/src/summary/resynthesize_test.dart ('k') | pkg/analyzer/test/src/summary/summary_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698