| 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.toplevel; | 5 library test.services.completion.toplevel; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart' as protocol | 7 import 'package:analysis_server/src/protocol.dart' as protocol |
| 8 show Element, ElementKind; | 8 show Element, ElementKind; |
| 9 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; | 9 import 'package:analysis_server/src/protocol.dart' hide Element, ElementKind; |
| 10 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; | 10 import 'package:analysis_server/src/services/completion/completion_manager.dart'
; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 DartCompletionCache cache = request.cache; | 110 DartCompletionCache cache = request.cache; |
| 111 if (isCached(cache.importedTypeSuggestions, completion) || | 111 if (isCached(cache.importedTypeSuggestions, completion) || |
| 112 isCached(cache.importedVoidReturnSuggestions, completion) || | 112 isCached(cache.importedVoidReturnSuggestions, completion) || |
| 113 isCached(cache.libraryPrefixSuggestions, completion) || | 113 isCached(cache.libraryPrefixSuggestions, completion) || |
| 114 isCached(cache.otherImportedSuggestions, completion)) { | 114 isCached(cache.otherImportedSuggestions, completion)) { |
| 115 fail('expected $completion NOT to be cached'); | 115 fail('expected $completion NOT to be cached'); |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 @override | 119 @override |
| 120 CompletionSuggestion assertSuggestImportedConstructor(String name) { | 120 CompletionSuggestion assertSuggestImportedConstructor(String name, |
| 121 return assertSuggestConstructor(name); | 121 {int relevance: DART_RELEVANCE_DEFAULT}) { |
| 122 return assertSuggestConstructor(name, relevance: relevance); |
| 122 } | 123 } |
| 123 | 124 |
| 124 @override | 125 @override |
| 125 CompletionSuggestion assertSuggestImportedField(String name, String type, | 126 CompletionSuggestion assertSuggestImportedField(String name, String type, |
| 126 {int relevance: DART_RELEVANCE_INHERITED_FIELD}) { | 127 {int relevance: DART_RELEVANCE_INHERITED_FIELD}) { |
| 127 return assertSuggestField(name, type, relevance: relevance); | 128 return assertSuggestField(name, type, relevance: relevance); |
| 128 } | 129 } |
| 129 | 130 |
| 130 @override | 131 @override |
| 131 CompletionSuggestion assertSuggestImportedFunction( | 132 CompletionSuggestion assertSuggestImportedFunction( |
| (...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 726 } | 727 } |
| 727 | 728 |
| 728 @override | 729 @override |
| 729 test_partFile_TypeName2() { | 730 test_partFile_TypeName2() { |
| 730 return super.test_partFile_TypeName2().then((_) { | 731 return super.test_partFile_TypeName2().then((_) { |
| 731 expect(request.cache.importKey, | 732 expect(request.cache.importKey, |
| 732 'library libA;import "/testB.dart";part "/testA.dart";'); | 733 'library libA;import "/testB.dart";part "/testA.dart";'); |
| 733 }); | 734 }); |
| 734 } | 735 } |
| 735 } | 736 } |
| OLD | NEW |