| 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.invocation; | 5 library test.services.completion.invocation; |
| 6 | 6 |
| 7 | 7 |
| 8 import 'package:analysis_server/src/protocol.dart'; | 8 import 'package:analysis_server/src/protocol.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:analysis_server/src/services/completion/invocation_computer.dart
'; | 10 import 'package:analysis_server/src/services/completion/invocation_computer.dart
'; |
| 11 import 'package:unittest/unittest.dart'; | 11 import 'package:unittest/unittest.dart'; |
| 12 | 12 |
| 13 import '../../reflective_tests.dart'; | 13 import '../../reflective_tests.dart'; |
| 14 import 'completion_test_util.dart'; | 14 import 'completion_test_util.dart'; |
| 15 | 15 |
| 16 main() { | 16 main() { |
| 17 groupSep = ' | '; | 17 groupSep = ' | '; |
| 18 runReflectiveTests(InvocationComputerTest); | 18 runReflectiveTests(InvocationComputerTest); |
| 19 } | 19 } |
| 20 | 20 |
| 21 @ReflectiveTestCase() | 21 @ReflectiveTestCase() |
| 22 class InvocationComputerTest extends AbstractSelectorSuggestionTest { | 22 class InvocationComputerTest extends AbstractSelectorSuggestionTest { |
| 23 | 23 |
| 24 void assertHasNoParameterInfo(CompletionSuggestion suggestion) { | |
| 25 expect(suggestion.parameterNames, isNull); | |
| 26 expect(suggestion.parameterTypes, isNull); | |
| 27 expect(suggestion.requiredParameterCount, isNull); | |
| 28 expect(suggestion.hasNamedParameters, isNull); | |
| 29 } | |
| 30 | |
| 31 @override | 24 @override |
| 32 CompletionSuggestion assertSuggestInvocationField(String name, String type, | 25 CompletionSuggestion assertSuggestInvocationField(String name, String type, |
| 33 {int relevance: COMPLETION_RELEVANCE_DEFAULT, bool isDeprecated: false}) { | 26 {int relevance: COMPLETION_RELEVANCE_DEFAULT, bool isDeprecated: false}) { |
| 34 return assertSuggestField( | 27 return assertSuggestField( |
| 35 name, | 28 name, |
| 36 type, | 29 type, |
| 37 relevance: relevance, | 30 relevance: relevance, |
| 38 isDeprecated: isDeprecated); | 31 isDeprecated: isDeprecated); |
| 39 } | 32 } |
| 40 | 33 |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 class C { | 171 class C { |
| 179 set x(int value) {}; | 172 set x(int value) {}; |
| 180 } | 173 } |
| 181 void main() {int y = new C().^}'''); | 174 void main() {int y = new C().^}'''); |
| 182 return computeFull((bool result) { | 175 return computeFull((bool result) { |
| 183 CompletionSuggestion suggestion = assertSuggestSetter('x'); | 176 CompletionSuggestion suggestion = assertSuggestSetter('x'); |
| 184 assertHasNoParameterInfo(suggestion); | 177 assertHasNoParameterInfo(suggestion); |
| 185 }); | 178 }); |
| 186 } | 179 } |
| 187 } | 180 } |
| OLD | NEW |