Chromium Code Reviews| 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 932e1fcddbe809f5bae3dfbb86b0fdd5dede0e24..59323372f541d90f9f76e218f86f921251b547f7 100644 |
| --- a/pkg/analyzer/test/src/summary/summarize_ast_test.dart |
| +++ b/pkg/analyzer/test/src/summary/summarize_ast_test.dart |
| @@ -153,18 +153,22 @@ abstract class LinkedSummarizeAstTest extends SummaryLinkerTest |
| expect(linked, isNotNull); |
| validateLinkedLibrary(linked); |
| unlinkedUnits = <UnlinkedUnit>[linkerInputs.unlinkedDefiningUnit]; |
| - for (String relativeUri |
| + for (String relativeUriStr |
| in linkerInputs.unlinkedDefiningUnit.publicNamespace.parts) { |
| - UnlinkedUnit unit = uriToUnit[ |
| - resolveRelativeUri(linkerInputs.testDartUri, Uri.parse(relativeUri)) |
| - .toString()]; |
| - if (unit == null) { |
| - if (!allowMissingFiles) { |
| - fail('Test referred to unknown unit $relativeUri'); |
| + UnlinkedUnit unit; |
| + try { |
| + Uri relativeUri = Uri.parse(relativeUriStr); |
| + unit = uriToUnit[ |
| + resolveRelativeUri(linkerInputs.testDartUri, relativeUri) |
| + .toString()]; |
| + if (unit == null) { |
| + if (!allowMissingFiles) { |
| + fail('Test referred to unknown unit $relativeUriStr'); |
| + } |
| + } else { |
| + unlinkedUnits.add(unit); |
| } |
| - } else { |
| - unlinkedUnits.add(unit); |
| - } |
| + } on FormatException {} |
|
Brian Wilkerson
2017/02/01 21:02:10
Comment explaining why we don't care about the exc
scheglov
2017/02/01 21:08:48
I made a tweak - we now store an empty unlinked un
|
| } |
| } |