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

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

Issue 2700843002: Use absolute URIs for LinkedDependency.uri/parts. (Closed)
Patch Set: Created 3 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
Index: pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
diff --git a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
index b101aa64df0ac2e7a8257988cc988782561c74c7..6fc2f5286c15673c19b1b753fbba22d253516966 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -889,18 +889,9 @@ abstract class _AstResynthesizeTestMixin
return;
}
- Source resolveRelativeUri(String relativeUri) {
- Source resolvedSource =
- context.sourceFactory.resolveUri(librarySource, relativeUri);
- if (resolvedSource == null && !allowMissingFiles) {
- throw new StateError('Could not resolve $relativeUri in the context of '
- '$librarySource (${librarySource.runtimeType})');
- }
- return resolvedSource;
- }
-
- UnlinkedUnit getPart(String relativeUri) {
- return _getUnlinkedUnit(resolveRelativeUri(relativeUri));
+ UnlinkedUnit getPart(String absoluteUri) {
+ Source source = context.sourceFactory.forUri(absoluteUri);
+ return _getUnlinkedUnit(source);
}
UnlinkedPublicNamespace getImport(String relativeUri) {
@@ -909,10 +900,11 @@ abstract class _AstResynthesizeTestMixin
UnlinkedUnit definingUnit = _getUnlinkedUnit(librarySource);
if (definingUnit != null) {
- LinkedLibraryBuilder linkedLibrary = prelink(
+ LinkedLibraryBuilder linkedLibrary = prelink(librarySource.uri.toString(),
definingUnit, getPart, getImport, context.declaredVariables.get);
linkedLibrary.dependencies.skip(1).forEach((LinkedDependency d) {
- _serializeLibrary(resolveRelativeUri(d.uri));
+ Source source = context.sourceFactory.forUri(d.uri);
+ _serializeLibrary(source);
});
}
}

Powered by Google App Engine
This is Rietveld 408576698