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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/convert_getter_to_method_test.dart

Issue 2975253002: Format analyzer, analysis_server, analyzer_plugin, front_end and kernel with the latest dartfmt. (Closed)
Patch Set: Created 3 years, 5 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 import 'dart:async'; 5 import 'dart:async';
6 6
7 import 'package:analysis_server/src/services/correction/status.dart'; 7 import 'package:analysis_server/src/services/correction/status.dart';
8 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 8 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide ElementKind; 10 import 'package:analyzer_plugin/protocol/protocol_common.dart' hide ElementKind;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 main(A a, B b, C c, D d) { 80 main(A a, B b, C c, D d) {
81 var va = a.test(); 81 var va = a.test();
82 var vb = b.test(); 82 var vb = b.test();
83 var vc = c.test(); 83 var vc = c.test();
84 var vd = d.test(); 84 var vd = d.test();
85 } 85 }
86 '''); 86 ''');
87 } 87 }
88 88
89 test_change_multipleFiles() async { 89 test_change_multipleFiles() async {
90 await indexUnit( 90 await indexUnit('/other.dart', r'''
91 '/other.dart',
92 r'''
93 class A { 91 class A {
94 int get test => 1; 92 int get test => 1;
95 } 93 }
96 '''); 94 ''');
97 await indexTestUnit(''' 95 await indexTestUnit('''
98 import 'other.dart'; 96 import 'other.dart';
99 class B extends A { 97 class B extends A {
100 int get test => 2; 98 int get test => 2;
101 } 99 }
102 main(A a, B b) { 100 main(A a, B b) {
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 void _createRefactoringForElement(ExecutableElement element) { 154 void _createRefactoringForElement(ExecutableElement element) {
157 refactoring = new ConvertGetterToMethodRefactoring( 155 refactoring = new ConvertGetterToMethodRefactoring(
158 searchEngine, astProvider, element); 156 searchEngine, astProvider, element);
159 } 157 }
160 158
161 void _createRefactoringForString(String search) { 159 void _createRefactoringForString(String search) {
162 ExecutableElement element = findNodeElementAtString(search); 160 ExecutableElement element = findNodeElementAtString(search);
163 _createRefactoringForElement(element); 161 _createRefactoringForElement(element);
164 } 162 }
165 } 163 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698