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

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

Issue 2615903003: Fix for resynthesizing libraries with invalid part URIs. (Closed)
Patch Set: Un-fail other tests. Created 3 years, 11 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 29e30d3860b49dd7ba98c81ef0ce439837a179e5..aa9cde3d41c5cf0c6cc413d6a90c8a423eb4d0ac 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_ast_test.dart
@@ -832,6 +832,10 @@ abstract class _AstResynthesizeTestMixin
}
UnlinkedUnit _getUnlinkedUnit(Source source) {
+ if (source == null) {
+ return new UnlinkedUnitBuilder();
+ }
+
String uriStr = source.uri.toString();
{
UnlinkedUnit unlinkedUnitInSdk =
@@ -873,7 +877,7 @@ abstract class _AstResynthesizeTestMixin
Source resolveRelativeUri(String relativeUri) {
Source resolvedSource =
context.sourceFactory.resolveUri(librarySource, relativeUri);
- if (resolvedSource == null) {
+ if (resolvedSource == null && !allowMissingFiles) {
throw new StateError('Could not resolve $relativeUri in the context of '
'$librarySource (${librarySource.runtimeType})');
}
« no previous file with comments | « pkg/analyzer/lib/src/summary/resynthesize.dart ('k') | pkg/analyzer/test/src/summary/resynthesize_common.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698