| Index: pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
|
| index 2ee39fb3e2fb79b44ece1ab6f8356341dc2f061c..462d7872ff61959dae9b039e5d70b900714b27eb 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/completion_manager_test.dart
|
| @@ -67,10 +67,16 @@ part '$testFile';
|
| expect(imports, hasLength(directives.length + 1));
|
|
|
| ImportElement importNamed(String expectedUri) {
|
| - return imports.firstWhere((elem) => elem.uri == expectedUri, orElse: () {
|
| - var importedNames = imports.map((elem) => elem.uri);
|
| - fail('Failed to find $expectedUri in $importedNames');
|
| - });
|
| + List<String> uriList = <String>[];
|
| + for (ImportElement importElement in imports) {
|
| + String uri = importElement.importedLibrary.source.uri.toString();
|
| + uriList.add(uri);
|
| + if (uri.endsWith(expectedUri)) {
|
| + return importElement;
|
| + }
|
| + }
|
| + fail('Failed to find $expectedUri in $uriList');
|
| + return null;
|
| }
|
|
|
| void assertImportedLib(String expectedUri) {
|
| @@ -79,7 +85,7 @@ part '$testFile';
|
| }
|
|
|
| // Assert that the new imports each have an export namespace
|
| - assertImportedLib(null /* dart:core */);
|
| - assertImportedLib('/libA.dart');
|
| + assertImportedLib('dart:core');
|
| + assertImportedLib('libA.dart');
|
| }
|
| }
|
|
|