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

Unified Diff: pkg/analysis_server/test/edit/refactoring_test.dart

Issue 571523002: Issue 20894. Rename 'Class' when rename refactoring is activated on 'Class' in 'new Class.name()'. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 3 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
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analyzer/lib/src/generated/ast.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 ea4f3bd707a89b43e65a584c93b835a0701058fd..e28c22706b6f521aca72a71feb838c5f3d15c1e0 100644
--- a/pkg/analysis_server/test/edit/refactoring_test.dart
+++ b/pkg/analysis_server/test/edit/refactoring_test.dart
@@ -802,6 +802,31 @@ class A {
''');
}
+ test_class_fromInstanceCreation() {
+ addTestFile('''
+class Test {
+ Test() {}
+ Test.named() {}
+}
+main() {
+ new Test();
+ new Test.named();
+}
+''');
+ return assertSuccessfulRefactoring(() {
+ return sendRenameRequest('Test();', 'NewName');
+ }, '''
+class NewName {
+ NewName() {}
+ NewName.named() {}
+}
+main() {
+ new NewName();
+ new NewName.named();
+}
+''');
+ }
+
test_class_options_fatalError() {
addTestFile('''
class Test {}
@@ -873,7 +898,7 @@ main() {
});
}
- test_constructor() {
+ test_constructor_fromInstanceCreation() {
addTestFile('''
class A {
A.test() {}
« no previous file with comments | « pkg/analysis_server/pubspec.yaml ('k') | pkg/analyzer/lib/src/generated/ast.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698