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

Unified Diff: pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart

Issue 881943002: Fix for 'Convert Method to Getter' when multiple files are changed. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 11 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/test/services/refactoring/convert_getter_to_method_test.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
diff --git a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
index 21fdbe01cf1f76af83ee57c5c2026ff366b8f908..a4216f094c93410ffe2beeb72a63be893ca5fd21 100644
--- a/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
+++ b/pkg/analysis_server/test/services/refactoring/convert_method_to_getter_test.dart
@@ -89,6 +89,36 @@ main(A a, B b, C c, D d) {
''');
}
+ test_change_multipleFiles() {
+ indexUnit('/other.dart', r'''
+class A {
+ int test() => 1;
+}
+''');
+ indexTestUnit('''
+import 'other.dart';
+class B extends A {
+ int test() => 2;
+}
+main(A a, B b) {
+ a.test();
+ b.test();
+}
+''');
+ _createRefactoringForString('test() => 2');
+ // apply refactoring
+ return _assertSuccessfulRefactoring('''
+import 'other.dart';
+class B extends A {
+ int get test => 2;
+}
+main(A a, B b) {
+ a.test;
+ b.test;
+}
+''');
+ }
+
test_checkInitialConditions_alreadyGetter() {
indexTestUnit('''
int get test => 42;
« no previous file with comments | « pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698