| Index: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameFunctionProcessorTest.java
|
| diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameFunctionProcessorTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameFunctionProcessorTest.java
|
| index b2fc89857e7a059e7117bd8c8a0d10d55981f4a2..0ee2df42edea9645f7c96c2b3a0859378edd1e04 100644
|
| --- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameFunctionProcessorTest.java
|
| +++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameFunctionProcessorTest.java
|
| @@ -127,6 +127,30 @@ public final class RenameFunctionProcessorTest extends RefactoringTest {
|
| "");
|
| }
|
|
|
| + public void test_OK_getter() throws Exception {
|
| + setTestUnitContent(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "int get test() {",
|
| + " return 42;",
|
| + "}",
|
| + "f() {",
|
| + " print(test);",
|
| + "}",
|
| + "");
|
| + DartFunction function = findElement("test() {");
|
| + // do rename
|
| + renameFunction(function, "newName");
|
| + assertTestUnitContent(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "int get newName() {",
|
| + " return 42;",
|
| + "}",
|
| + "f() {",
|
| + " print(newName);",
|
| + "}",
|
| + "");
|
| + }
|
| +
|
| public void test_OK_multipleUnits_onReference() throws Exception {
|
| setUnitContent(
|
| "Test1.dart",
|
| @@ -164,6 +188,28 @@ public final class RenameFunctionProcessorTest extends RefactoringTest {
|
| "}");
|
| }
|
|
|
| + public void test_OK_setter() throws Exception {
|
| + setTestUnitContent(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "void set test(x) {",
|
| + "}",
|
| + "f() {",
|
| + " test = 42;",
|
| + "}",
|
| + "");
|
| + DartFunction function = findElement("test = 42;");
|
| + // do rename
|
| + renameFunction(function, "newName");
|
| + assertTestUnitContent(
|
| + "// filler filler filler filler filler filler filler filler filler filler",
|
| + "void set newName(x) {",
|
| + "}",
|
| + "f() {",
|
| + " newName = 42;",
|
| + "}",
|
| + "");
|
| + }
|
| +
|
| public void test_OK_singleUnit_onDeclaration() throws Exception {
|
| setTestUnitContent(
|
| "// filler filler filler filler filler filler filler filler filler filler",
|
|
|