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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/extract_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/extract_method.dart'; 8 import 'package:analysis_server/src/services/refactoring/extract_method.dart';
9 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 9 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
10 import 'package:analyzer_plugin/protocol/protocol_common.dart'; 10 import 'package:analyzer_plugin/protocol/protocol_common.dart';
(...skipping 2779 matching lines...) Expand 10 before | Expand all | Expand 10 after
2790 } 2790 }
2791 2791
2792 void res() { 2792 void res() {
2793 print(0); 2793 print(0);
2794 print(0); 2794 print(0);
2795 } 2795 }
2796 '''); 2796 ''');
2797 } 2797 }
2798 2798
2799 void _addLibraryReturningAsync() { 2799 void _addLibraryReturningAsync() {
2800 addSource( 2800 addSource('/asyncLib.dart', r'''
2801 '/asyncLib.dart',
2802 r'''
2803 library asyncLib; 2801 library asyncLib;
2804 import 'dart:async'; 2802 import 'dart:async';
2805 Future<int> newFuture() => null; 2803 Future<int> newFuture() => null;
2806 '''); 2804 ''');
2807 } 2805 }
2808 2806
2809 Future _assertConditionsError(String message) async { 2807 Future _assertConditionsError(String message) async {
2810 RefactoringStatus status = await refactoring.checkAllConditions(); 2808 RefactoringStatus status = await refactoring.checkAllConditions();
2811 assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR, 2809 assertRefactoringStatus(status, RefactoringProblemSeverity.ERROR,
2812 expectedMessage: message); 2810 expectedMessage: message);
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
2879 * Returns a deep copy of [refactoring] parameters. 2877 * Returns a deep copy of [refactoring] parameters.
2880 * There was a bug masked by updating parameter instances shared between the 2878 * There was a bug masked by updating parameter instances shared between the
2881 * refactoring and the test. 2879 * refactoring and the test.
2882 */ 2880 */
2883 List<RefactoringMethodParameter> _getParametersCopy() { 2881 List<RefactoringMethodParameter> _getParametersCopy() {
2884 return refactoring.parameters.map((p) { 2882 return refactoring.parameters.map((p) {
2885 return new RefactoringMethodParameter(p.kind, p.type, p.name, id: p.id); 2883 return new RefactoringMethodParameter(p.kind, p.type, p.name, id: p.id);
2886 }).toList(); 2884 }).toList();
2887 } 2885 }
2888 } 2886 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698