| Index: pkg/analysis_server/test/services/correction/fix_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/fix_test.dart b/pkg/analysis_server/test/services/correction/fix_test.dart
|
| index 97ea82cdbfe130d00512f9dfc2254f123b101fb4..7406f2f50d553b22ad472e527ec1f52275ed7d3f 100644
|
| --- a/pkg/analysis_server/test/services/correction/fix_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/fix_test.dart
|
| @@ -97,6 +97,63 @@ bool test() {
|
| verifyNoTestUnitErrors = false;
|
| }
|
|
|
| + void test_addFieldFormalParameters_hasRequiredParameter() {
|
| + resolveTestUnit('''
|
| +class Test {
|
| + final int a;
|
| + final int b;
|
| + final int c;
|
| + Test(this.a);
|
| +}
|
| +''');
|
| + assertHasFix(FixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
|
| +class Test {
|
| + final int a;
|
| + final int b;
|
| + final int c;
|
| + Test(this.a, this.b, this.c);
|
| +}
|
| +''');
|
| + }
|
| +
|
| + void test_addFieldFormalParameters_noParameters() {
|
| + resolveTestUnit('''
|
| +class Test {
|
| + final int a;
|
| + final int b;
|
| + final int c;
|
| + Test();
|
| +}
|
| +''');
|
| + assertHasFix(FixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
|
| +class Test {
|
| + final int a;
|
| + final int b;
|
| + final int c;
|
| + Test(this.a, this.b, this.c);
|
| +}
|
| +''');
|
| + }
|
| +
|
| + void test_addFieldFormalParameters_noRequiredParameter() {
|
| + resolveTestUnit('''
|
| +class Test {
|
| + final int a;
|
| + final int b;
|
| + final int c;
|
| + Test([this.c]);
|
| +}
|
| +''');
|
| + assertHasFix(FixKind.ADD_FIELD_FORMAL_PARAMETERS, '''
|
| +class Test {
|
| + final int a;
|
| + final int b;
|
| + final int c;
|
| + Test(this.a, this.b, [this.c]);
|
| +}
|
| +''');
|
| + }
|
| +
|
| void test_addSync_blockFunctionBody() {
|
| resolveTestUnit('''
|
| foo() {}
|
|
|