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

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

Issue 11377039: Issue 6251. Resolve and rename type and constructor references in [new Type.name]. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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 943bfd5260ba4ff095816c45440cdc034dc86b48..9e34c8d25b57becbdba4ed8bd96a475d0b09ce9a 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
@@ -618,7 +618,27 @@ public final class RenameMethodProcessorTest extends RefactoringTest {
"");
}
- public void test_OK_updateIdentifierInComment() throws Exception {
+ public void test_OK_updateComment_constructor() throws Exception {
+ setTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "/** Create using [new A.test] constructor. */",
+ "class A {",
+ " A.test() {}",
+ "}",
+ "");
+ Method method = findElement("test() {}");
+ // do rename
+ renameMethod(method, "newName");
+ assertTestUnitContent(
+ "// filler filler filler filler filler filler filler filler filler filler",
+ "/** Create using [new A.newName] constructor. */",
+ "class A {",
+ " A.newName() {}",
+ "}",
+ "");
+ }
+
+ public void test_OK_updateInComment_method() throws Exception {
setTestUnitContent(
"// filler filler filler filler filler filler filler filler filler filler",
"/** After creation call [test]. */",

Powered by Google App Engine
This is Rietveld 408576698