Index: pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart |
diff --git a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart |
index 1c80727f60b51eeab103861d5f883d4483533b7c..cc80c229a30c8f7357631da22f872b0f813dfa96 100644 |
--- a/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart |
+++ b/pkg/analysis_server/test/services/completion/local_reference_contributor_test.dart |
@@ -45,12 +45,6 @@ class LocalReferenceContributorTest extends AbstractSelectorSuggestionTest { |
} |
@override |
- CompletionSuggestion assertSuggestLocalConstructor(String name, |
- {int elemOffset}) { |
- return assertSuggestConstructor(name, elemOffset: elemOffset); |
- } |
- |
- @override |
CompletionSuggestion assertSuggestLocalField(String name, String type, |
{int relevance: DART_RELEVANCE_LOCAL_FIELD, bool deprecated: false}) { |
return assertSuggestField(name, type, |
@@ -643,39 +637,10 @@ class C {C.bar({boo: 'hoo', int z: 0}) { } } |
main() {new ^ String x = "hello";}'''); |
computeFast(); |
return computeFull((bool result) { |
- CompletionSuggestion suggestion; |
- |
- suggestion = assertSuggestLocalConstructor('A', elemOffset: -1); |
- expect(suggestion.element.parameters, '()'); |
- expect(suggestion.element.returnType, 'A'); |
- expect(suggestion.declaringType, 'A'); |
- expect(suggestion.parameterNames, hasLength(0)); |
- expect(suggestion.requiredParameterCount, 0); |
- expect(suggestion.hasNamedParameters, false); |
- |
- suggestion = assertSuggestLocalConstructor('B'); |
- expect(suggestion.element.parameters, '(int x, [String boo])'); |
- expect(suggestion.element.returnType, 'B'); |
- expect(suggestion.declaringType, 'B'); |
- expect(suggestion.parameterNames, hasLength(2)); |
- expect(suggestion.parameterNames[0], 'x'); |
- expect(suggestion.parameterTypes[0], 'int'); |
- expect(suggestion.parameterNames[1], 'boo'); |
- expect(suggestion.parameterTypes[1], 'String'); |
- expect(suggestion.requiredParameterCount, 1); |
- expect(suggestion.hasNamedParameters, false); |
- |
- suggestion = assertSuggestLocalConstructor('C.bar'); |
- expect(suggestion.element.parameters, '({dynamic boo, int z})'); |
- expect(suggestion.element.returnType, 'C'); |
- expect(suggestion.declaringType, 'C'); |
- expect(suggestion.parameterNames, hasLength(2)); |
- expect(suggestion.parameterNames[0], 'boo'); |
- expect(suggestion.parameterTypes[0], 'dynamic'); |
- expect(suggestion.parameterNames[1], 'z'); |
- expect(suggestion.parameterTypes[1], 'int'); |
- expect(suggestion.requiredParameterCount, 0); |
- expect(suggestion.hasNamedParameters, true); |
+ // Suggested by ConstructorContributor |
+ assertNotSuggested('A'); |
+ assertNotSuggested('B'); |
+ assertNotSuggested('C.bar'); |
}); |
} |