| Index: pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
|
| index 2f3915936a4f21ece4b1f11da8c9645d0e7bc204..cc4d6f8383a9410c4dd024ba456f167aa533825e 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/field_formal_contributor_test.dart
|
| @@ -164,4 +164,36 @@ class FieldFormalContributorTest extends DartCompletionContributorTest {
|
| assertNotSuggested('Object');
|
| assertNotSuggested('==');
|
| }
|
| +
|
| + test_ThisExpression_constructor_param_optional() async {
|
| + // SimpleIdentifier FieldFormalParameter FormalParameterList
|
| + addTestSource('''
|
| + main() { }
|
| + class Point {
|
| + int x;
|
| + int y;
|
| + Point({this.x, this.^}) {}
|
| + ''');
|
| + await computeSuggestions();
|
| + expect(replacementOffset, completionOffset);
|
| + expect(replacementLength, 0);
|
| + assertSuggestField('y', 'int', relevance: DART_RELEVANCE_LOCAL_FIELD);
|
| + assertNotSuggested('x');
|
| + }
|
| +
|
| + test_ThisExpression_constructor_param_positional() async {
|
| + // SimpleIdentifier FieldFormalParameter FormalParameterList
|
| + addTestSource('''
|
| + main() { }
|
| + class Point {
|
| + int x;
|
| + int y;
|
| + Point({this.x, this.^}) {}
|
| + ''');
|
| + await computeSuggestions();
|
| + expect(replacementOffset, completionOffset);
|
| + expect(replacementLength, 0);
|
| + assertSuggestField('y', 'int', relevance: DART_RELEVANCE_LOCAL_FIELD);
|
| + assertNotSuggested('x');
|
| + }
|
| }
|
|
|