| 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.combinator; | 5 library test.services.completion.dart.combinator; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart'; | 7 import 'package:analysis_server/src/protocol.dart'; |
| 8 import 'package:analysis_server/src/services/completion/combinator_computer.dart
'; | 8 import 'package:analysis_server/src/services/completion/combinator_computer.dart
'; |
| 9 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; | 9 import 'package:analysis_server/src/services/completion/dart_completion_manager.
dart'; |
| 10 import 'package:unittest/unittest.dart'; | 10 import 'package:unittest/unittest.dart'; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 class C { } | 55 class C { } |
| 56 class D { }'''); | 56 class D { }'''); |
| 57 addTestSource(''' | 57 addTestSource(''' |
| 58 import "/testAB.dart" hide ^; | 58 import "/testAB.dart" hide ^; |
| 59 import "/testCD.dart"; | 59 import "/testCD.dart"; |
| 60 class X {}'''); | 60 class X {}'''); |
| 61 computeFast(); | 61 computeFast(); |
| 62 return computeFull((bool result) { | 62 return computeFull((bool result) { |
| 63 assertSuggestClass( | 63 assertSuggestClass( |
| 64 'A', | 64 'A', |
| 65 COMPLETION_RELEVANCE_DEFAULT, | 65 relevance: COMPLETION_RELEVANCE_DEFAULT, |
| 66 CompletionSuggestionKind.IDENTIFIER); | 66 kind: CompletionSuggestionKind.IDENTIFIER); |
| 67 assertSuggestClass( | 67 assertSuggestClass( |
| 68 'B', | 68 'B', |
| 69 COMPLETION_RELEVANCE_DEFAULT, | 69 relevance: COMPLETION_RELEVANCE_DEFAULT, |
| 70 CompletionSuggestionKind.IDENTIFIER); | 70 kind: CompletionSuggestionKind.IDENTIFIER); |
| 71 assertSuggestClass( | 71 assertSuggestClass( |
| 72 'PB', | 72 'PB', |
| 73 COMPLETION_RELEVANCE_DEFAULT, | 73 relevance: COMPLETION_RELEVANCE_DEFAULT, |
| 74 CompletionSuggestionKind.IDENTIFIER); | 74 kind: CompletionSuggestionKind.IDENTIFIER); |
| 75 assertSuggestTopLevelVar( | 75 assertSuggestTopLevelVar( |
| 76 'T1', | 76 'T1', |
| 77 null, | 77 null, |
| 78 COMPLETION_RELEVANCE_DEFAULT, | 78 COMPLETION_RELEVANCE_DEFAULT, |
| 79 CompletionSuggestionKind.IDENTIFIER); | 79 CompletionSuggestionKind.IDENTIFIER); |
| 80 assertSuggestFunction( | 80 assertSuggestFunction( |
| 81 'F1', | 81 'F1', |
| 82 'PB', | 82 'PB', |
| 83 false, | 83 false, |
| 84 COMPLETION_RELEVANCE_DEFAULT, | 84 COMPLETION_RELEVANCE_DEFAULT, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 108 class C { } | 108 class C { } |
| 109 class D { }'''); | 109 class D { }'''); |
| 110 addTestSource(''' | 110 addTestSource(''' |
| 111 import "/testAB.dart" show ^; | 111 import "/testAB.dart" show ^; |
| 112 import "/testCD.dart"; | 112 import "/testCD.dart"; |
| 113 class X {}'''); | 113 class X {}'''); |
| 114 computeFast(); | 114 computeFast(); |
| 115 return computeFull((bool result) { | 115 return computeFull((bool result) { |
| 116 assertSuggestClass( | 116 assertSuggestClass( |
| 117 'A', | 117 'A', |
| 118 COMPLETION_RELEVANCE_DEFAULT, | 118 relevance: COMPLETION_RELEVANCE_DEFAULT, |
| 119 CompletionSuggestionKind.IDENTIFIER); | 119 kind: CompletionSuggestionKind.IDENTIFIER); |
| 120 assertSuggestClass( | 120 assertSuggestClass( |
| 121 'B', | 121 'B', |
| 122 COMPLETION_RELEVANCE_DEFAULT, | 122 relevance: COMPLETION_RELEVANCE_DEFAULT, |
| 123 CompletionSuggestionKind.IDENTIFIER); | 123 kind: CompletionSuggestionKind.IDENTIFIER); |
| 124 assertSuggestClass( | 124 assertSuggestClass( |
| 125 'PB', | 125 'PB', |
| 126 COMPLETION_RELEVANCE_DEFAULT, | 126 relevance: COMPLETION_RELEVANCE_DEFAULT, |
| 127 CompletionSuggestionKind.IDENTIFIER); | 127 kind: CompletionSuggestionKind.IDENTIFIER); |
| 128 assertSuggestTopLevelVar( | 128 assertSuggestTopLevelVar( |
| 129 'T1', | 129 'T1', |
| 130 null, | 130 null, |
| 131 COMPLETION_RELEVANCE_DEFAULT, | 131 COMPLETION_RELEVANCE_DEFAULT, |
| 132 CompletionSuggestionKind.IDENTIFIER); | 132 CompletionSuggestionKind.IDENTIFIER); |
| 133 assertSuggestFunction( | 133 assertSuggestFunction( |
| 134 'F1', | 134 'F1', |
| 135 'PB', | 135 'PB', |
| 136 false, | 136 false, |
| 137 COMPLETION_RELEVANCE_DEFAULT, | 137 COMPLETION_RELEVANCE_DEFAULT, |
| 138 CompletionSuggestionKind.IDENTIFIER); | 138 CompletionSuggestionKind.IDENTIFIER); |
| 139 assertSuggestClass( | 139 assertSuggestClass( |
| 140 'Clz', | 140 'Clz', |
| 141 COMPLETION_RELEVANCE_DEFAULT, | 141 relevance: COMPLETION_RELEVANCE_DEFAULT, |
| 142 CompletionSuggestionKind.IDENTIFIER); | 142 kind: CompletionSuggestionKind.IDENTIFIER); |
| 143 assertSuggestFunctionTypeAlias( | 143 assertSuggestFunctionTypeAlias( |
| 144 'F2', | 144 'F2', |
| 145 null, | 145 null, |
| 146 false, | 146 false, |
| 147 COMPLETION_RELEVANCE_DEFAULT, | 147 COMPLETION_RELEVANCE_DEFAULT, |
| 148 CompletionSuggestionKind.IDENTIFIER); | 148 CompletionSuggestionKind.IDENTIFIER); |
| 149 assertNotSuggested('C'); | 149 assertNotSuggested('C'); |
| 150 assertNotSuggested('D'); | 150 assertNotSuggested('D'); |
| 151 assertNotSuggested('X'); | 151 assertNotSuggested('X'); |
| 152 assertNotSuggested('Object'); | 152 assertNotSuggested('Object'); |
| 153 }); | 153 }); |
| 154 } | 154 } |
| 155 } | 155 } |
| OLD | NEW |