| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library test.services.completion.dart.manager; | 5 library test.services.completion.dart.manager; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; | 9 import 'package:analysis_server/src/provisional/completion/dart/completion_dart.
dart'; |
| 10 import 'package:analysis_server/src/services/completion/completion_core.dart'; | 10 import 'package:analysis_server/src/services/completion/completion_core.dart'; |
| 11 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; | 11 import 'package:analysis_server/src/services/completion/completion_performance.d
art'; |
| 12 import 'package:analysis_server/src/services/completion/dart/completion_manager.
dart'; | 12 import 'package:analysis_server/src/services/completion/dart/completion_manager.
dart'; |
| 13 import 'package:analysis_server/src/services/completion/dart/imported_reference_
contributor.dart'; | 13 import 'package:analysis_server/src/services/completion/dart/imported_reference_
contributor.dart'; |
| 14 import 'package:analyzer/dart/element/element.dart'; | 14 import 'package:analyzer/dart/element/element.dart'; |
| 15 import 'package:analyzer/src/task/dart.dart'; | 15 import 'package:analyzer/src/task/dart.dart'; |
| 16 import 'package:test/test.dart'; | 16 import 'package:test/test.dart'; |
| 17 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 17 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 18 | 18 |
| 19 import '../../../utils.dart'; | |
| 20 import 'completion_contributor_util.dart'; | 19 import 'completion_contributor_util.dart'; |
| 21 | 20 |
| 22 main() { | 21 main() { |
| 23 initializeTestEnvironment(); | |
| 24 defineReflectiveSuite(() { | 22 defineReflectiveSuite(() { |
| 25 defineReflectiveTests(CompletionManagerTest); | 23 defineReflectiveTests(CompletionManagerTest); |
| 26 }); | 24 }); |
| 27 } | 25 } |
| 28 | 26 |
| 29 @reflectiveTest | 27 @reflectiveTest |
| 30 class CompletionManagerTest extends DartCompletionContributorTest { | 28 class CompletionManagerTest extends DartCompletionContributorTest { |
| 31 @override | 29 @override |
| 32 DartCompletionContributor createContributor() { | 30 DartCompletionContributor createContributor() { |
| 33 return new ImportedReferenceContributor(); | 31 return new ImportedReferenceContributor(); |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 void assertImportedLib(String expectedUri) { | 95 void assertImportedLib(String expectedUri) { |
| 98 ImportElement importElem = importNamed(expectedUri); | 96 ImportElement importElem = importNamed(expectedUri); |
| 99 expect(importElem.importedLibrary.exportNamespace, isNotNull); | 97 expect(importElem.importedLibrary.exportNamespace, isNotNull); |
| 100 } | 98 } |
| 101 | 99 |
| 102 // Assert that the new imports each have an export namespace | 100 // Assert that the new imports each have an export namespace |
| 103 assertImportedLib(null /* dart:core */); | 101 assertImportedLib(null /* dart:core */); |
| 104 assertImportedLib('/libA.dart'); | 102 assertImportedLib('/libA.dart'); |
| 105 } | 103 } |
| 106 } | 104 } |
| OLD | NEW |