| Index: pkg/analysis_server/test/edit/refactoring_test.dart
|
| diff --git a/pkg/analysis_server/test/edit/refactoring_test.dart b/pkg/analysis_server/test/edit/refactoring_test.dart
|
| index 76350befedc40c6a66bf5343ad231ebb8330151e..cbfc511bbb3c923284cfe3443f31f54a8b3512ea 100644
|
| --- a/pkg/analysis_server/test/edit/refactoring_test.dart
|
| +++ b/pkg/analysis_server/test/edit/refactoring_test.dart
|
| @@ -1071,6 +1071,7 @@ main() {
|
| addTestFile('''
|
| class A {
|
| var test = 0;
|
| + A(this.test);
|
| main() {
|
| print(test);
|
| }
|
| @@ -1081,6 +1082,7 @@ class A {
|
| }, '''
|
| class A {
|
| var newName = 0;
|
| + A(this.newName);
|
| main() {
|
| print(newName);
|
| }
|
| @@ -1088,6 +1090,52 @@ class A {
|
| ''');
|
| }
|
|
|
| + test_classMember_field_onFieldFormalParameter() {
|
| + addTestFile('''
|
| +class A {
|
| + var test = 0;
|
| + A(this.test);
|
| + main() {
|
| + print(test);
|
| + }
|
| +}
|
| +''');
|
| + return assertSuccessfulRefactoring(() {
|
| + return sendRenameRequest('test);', 'newName');
|
| + }, '''
|
| +class A {
|
| + var newName = 0;
|
| + A(this.newName);
|
| + main() {
|
| + print(newName);
|
| + }
|
| +}
|
| +''');
|
| + }
|
| +
|
| + test_classMember_field_onFieldFormalParameter_named() {
|
| + addTestFile('''
|
| +class A {
|
| + final int test;
|
| + A({this.test: 0});
|
| +}
|
| +main() {
|
| + new A(test: 42);
|
| +}
|
| +''');
|
| + return assertSuccessfulRefactoring(() {
|
| + return sendRenameRequest('test: 42', 'newName');
|
| + }, '''
|
| +class A {
|
| + final int newName;
|
| + A({this.newName: 0});
|
| +}
|
| +main() {
|
| + new A(newName: 42);
|
| +}
|
| +''');
|
| + }
|
| +
|
| test_classMember_getter() {
|
| addTestFile('''
|
| class A {
|
|
|