| 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'; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 addSource( | 35 addSource( |
| 36 '/libA.dart', | 36 '/libA.dart', |
| 37 ''' | 37 ''' |
| 38 library libA; | 38 library libA; |
| 39 /// My class. | 39 /// My class. |
| 40 /// Short description. | 40 /// Short description. |
| 41 /// | 41 /// |
| 42 /// Longer description. | 42 /// Longer description. |
| 43 class A {} | 43 class A {} |
| 44 '''); | 44 '''); |
| 45 var libSource = addSource( | 45 addSource( |
| 46 '/libB.dart', | 46 '/libB.dart', |
| 47 ''' | 47 ''' |
| 48 library libB; | 48 library libB; |
| 49 import "/libA.dart" as foo; | 49 import "/libA.dart" as foo; |
| 50 part '$testFile'; | 50 part '$testFile'; |
| 51 '''); | 51 '''); |
| 52 addTestSource('part of libB; main() {^}'); | 52 addTestSource('part of libB; main() {^}'); |
| 53 | 53 |
| 54 // Build the request | 54 // Build the request |
| 55 CompletionRequestImpl baseRequest = new CompletionRequestImpl( | 55 CompletionRequestImpl baseRequest = new CompletionRequestImpl( |
| (...skipping 27 matching lines...) Expand all Loading... |
| 83 void assertImportedLib(String expectedUri) { | 83 void assertImportedLib(String expectedUri) { |
| 84 ImportElement importElem = importNamed(expectedUri); | 84 ImportElement importElem = importNamed(expectedUri); |
| 85 expect(importElem.importedLibrary.exportNamespace, isNotNull); | 85 expect(importElem.importedLibrary.exportNamespace, isNotNull); |
| 86 } | 86 } |
| 87 | 87 |
| 88 // Assert that the new imports each have an export namespace | 88 // Assert that the new imports each have an export namespace |
| 89 assertImportedLib(null /* dart:core */); | 89 assertImportedLib(null /* dart:core */); |
| 90 assertImportedLib('/libA.dart'); | 90 assertImportedLib('/libA.dart'); |
| 91 } | 91 } |
| 92 } | 92 } |
| OLD | NEW |