Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Unified Diff: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java

Issue 11305007: Getter with parameters is error. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java
diff --git a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java
index 920cf6bb148f262d0a676a3286e56b8f8d66e76a..263abc7dca33d28bc5c981bf5e5bc7f24c229b45 100644
--- a/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java
+++ b/editor/tools/plugins/com.google.dart.tools.ui_test/src/com/google/dart/tools/ui/refactoring/RenameMethodProcessorTest.java
@@ -178,7 +178,7 @@ public final class RenameMethodProcessorTest extends RefactoringTest {
setTestUnitContent(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
- " int get test() {",
+ " int get test {",
" return 42;",
" }",
"}",
@@ -187,13 +187,13 @@ public final class RenameMethodProcessorTest extends RefactoringTest {
" print(a.test);",
"}",
"");
- Method method = findElement("test() {");
+ Method method = findElement("test {");
// do rename
renameMethod(method, "newName");
assertTestUnitContent(
"// filler filler filler filler filler filler filler filler filler filler",
"class A {",
- " int get newName() {",
+ " int get newName {",
" return 42;",
" }",
"}",
@@ -204,6 +204,36 @@ public final class RenameMethodProcessorTest extends RefactoringTest {
"");
}
+ public void test_OK_inexactReferences() throws Exception {
+ setTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " test() {}",
+ "}",
+ "f1(A a) {",
+ " a.test();",
+ "}",
+ "f2(a) {",
+ " a.test();",
+ "}",
+ "");
+ Method method = findElement("test() {}");
+ // do rename
+ renameMethod(method, "newName");
+ assertTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "class A {",
+ " newName() {}",
+ "}",
+ "f1(A a) {",
+ " a.newName();",
+ "}",
+ "f2(a) {",
+ " a.newName();",
+ "}",
+ "");
+ }
+
public void test_OK_multipleUnits_onReference() throws Exception {
setUnitContent(
"Test1.dart",
@@ -460,36 +490,6 @@ public final class RenameMethodProcessorTest extends RefactoringTest {
" }",
"}");
}
-
- public void test_OK_inexactReferences() throws Exception {
- setTestUnitContent(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class A {",
- " test() {}",
- "}",
- "f1(A a) {",
- " a.test();",
- "}",
- "f2(a) {",
- " a.test();",
- "}",
- "");
- Method method = findElement("test() {}");
- // do rename
- renameMethod(method, "newName");
- assertTestUnitContent(
- "// filler filler filler filler filler filler filler filler filler filler",
- "class A {",
- " newName() {}",
- "}",
- "f1(A a) {",
- " a.newName();",
- "}",
- "f2(a) {",
- " a.newName();",
- "}",
- "");
- }
public void test_OK_singleUnit_onReference() throws Exception {
setTestUnitContent(

Powered by Google App Engine
This is Rietveld 408576698