| Index: pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
|
| index 6332eebde90d0a4f6823e7fef53cc16d8cf0bf5c..d534e1dab3f8e806ccd5eb69d4aafe65a12cabee 100644
|
| --- a/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
|
| +++ b/pkg/analysis_server/test/services/completion/dart/arglist_contributor_test.dart
|
| @@ -256,7 +256,8 @@ class A { const A(int one, int two, int three, {int four, String five:
|
|
|
| test_ArgumentList_imported_factory_named_param() async {
|
| // ArgumentList InstanceCreationExpression ExpressionStatement
|
| - addSource('/libA.dart', 'library libA; class A{factory A({int one}) => null;}');
|
| + addSource(
|
| + '/libA.dart', 'library libA; class A{factory A({int one}) => null;}');
|
| addTestSource('import "/libA.dart"; main() { new A(^);}');
|
| await computeSuggestions();
|
| assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
|
| @@ -264,7 +265,8 @@ class A { const A(int one, int two, int three, {int four, String five:
|
|
|
| test_ArgumentList_imported_factory_named_param2() async {
|
| // ArgumentList InstanceCreationExpression ExpressionStatement
|
| - addSource('/libA.dart', 'library libA; abstract class A{factory A.foo({int one});}');
|
| + addSource('/libA.dart',
|
| + 'library libA; abstract class A{factory A.foo({int one});}');
|
| addTestSource('import "/libA.dart"; main() { new A.foo(^);}');
|
| await computeSuggestions();
|
| assertSuggestArgumentsAndTypes(namedArgumentsWithTypes: {'one': 'int'});
|
| @@ -479,6 +481,40 @@ class A { const A(int one, int two, int three, {int four, String five:
|
| namedArgumentsWithTypes: {'radix': 'int', 'onError': '(String) → int'});
|
| }
|
|
|
| + test_ArgumentList_local_constructor_named_fieldFormal_documentation() async {
|
| + addTestSource('''
|
| +class A {
|
| + /// aaa
|
| + ///
|
| + /// bbb
|
| + /// ccc
|
| + int fff;
|
| +A({this.fff}) { } }
|
| +main() {
|
| + new A(^);
|
| +}
|
| +''');
|
| + await computeSuggestions();
|
| + expect(suggestions, hasLength(1));
|
| + expect(suggestions[0].docSummary, 'aaa');
|
| + expect(suggestions[0].docComplete, 'aaa\n\nbbb\nccc');
|
| + }
|
| +
|
| + test_ArgumentList_local_constructor_named_fieldFormal_noDocumentation() async {
|
| + addTestSource('''
|
| +class A {
|
| + int fff;
|
| +A({this.fff}) { } }
|
| +main() {
|
| + new A(^);
|
| +}
|
| +''');
|
| + await computeSuggestions();
|
| + expect(suggestions, hasLength(1));
|
| + expect(suggestions[0].docSummary, isNull);
|
| + expect(suggestions[0].docComplete, isNull);
|
| + }
|
| +
|
| test_ArgumentList_local_constructor_named_param() async {
|
| //
|
| addTestSource('''
|
|
|