| Index: pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
|
| diff --git a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
|
| index f10a11dd518eba5fcd66746bc21fe9fcdafe873e..6213f6f11bfc14c729ff832b5262871db2a9e5d8 100644
|
| --- a/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
|
| +++ b/pkg/analysis_server/test/services/refactoring/rename_constructor_test.dart
|
| @@ -22,40 +22,6 @@ main() {
|
|
|
| @reflectiveTest
|
| class RenameConstructorTest extends RenameRefactoringTest {
|
| - test_checkFinalConditions_hasMember_constructor() async {
|
| - indexTestUnit('''
|
| -class A {
|
| - A.test() {}
|
| - A.newName() {} // existing
|
| -}
|
| -''');
|
| - _createConstructorDeclarationRefactoring('test() {}');
|
| - // check status
|
| - refactoring.newName = 'newName';
|
| - RefactoringStatus status = await refactoring.checkFinalConditions();
|
| - assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
|
| - expectedMessage:
|
| - "Class 'A' already declares constructor with name 'newName'.",
|
| - expectedContextSearch: 'newName() {} // existing');
|
| - }
|
| -
|
| - test_checkFinalConditions_hasMember_method() async {
|
| - indexTestUnit('''
|
| -class A {
|
| - A.test() {}
|
| - newName() {} // existing
|
| -}
|
| -''');
|
| - _createConstructorDeclarationRefactoring('test() {}');
|
| - // check status
|
| - refactoring.newName = 'newName';
|
| - RefactoringStatus status = await refactoring.checkFinalConditions();
|
| - assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
|
| - expectedMessage:
|
| - "Class 'A' already declares method with name 'newName'.",
|
| - expectedContextSearch: 'newName() {} // existing');
|
| - }
|
| -
|
| test_checkInitialConditions_inSDK() async {
|
| indexTestUnit('''
|
| main() {
|
| @@ -98,6 +64,40 @@ class A {
|
| assertRefactoringStatusOK(refactoring.checkNewName());
|
| }
|
|
|
| + test_checkNewName_hasMember_constructor() async {
|
| + indexTestUnit('''
|
| +class A {
|
| + A.test() {}
|
| + A.newName() {} // existing
|
| +}
|
| +''');
|
| + _createConstructorDeclarationRefactoring('test() {}');
|
| + // check status
|
| + refactoring.newName = 'newName';
|
| + RefactoringStatus status = refactoring.checkNewName();
|
| + assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
|
| + expectedMessage:
|
| + "Class 'A' already declares constructor with name 'newName'.",
|
| + expectedContextSearch: 'newName() {} // existing');
|
| + }
|
| +
|
| + test_checkNewName_hasMember_method() async {
|
| + indexTestUnit('''
|
| +class A {
|
| + A.test() {}
|
| + newName() {} // existing
|
| +}
|
| +''');
|
| + _createConstructorDeclarationRefactoring('test() {}');
|
| + // check status
|
| + refactoring.newName = 'newName';
|
| + RefactoringStatus status = refactoring.checkNewName();
|
| + assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
|
| + expectedMessage:
|
| + "Class 'A' already declares method with name 'newName'.",
|
| + expectedContextSearch: 'newName() {} // existing');
|
| + }
|
| +
|
| test_createChange_add() {
|
| indexTestUnit('''
|
| class A {
|
|
|