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

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

Issue 2864813002: Switch the default from non-driver to driver in several tests (Closed)
Patch Set: Created 3 years, 7 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/protocol/protocol_generated.dart'; 7 import 'package:analysis_server/protocol/protocol_generated.dart';
8 import 'package:analysis_server/src/services/correction/status.dart'; 8 import 'package:analysis_server/src/services/correction/status.dart';
9 import 'package:analysis_server/src/services/refactoring/extract_method.dart'; 9 import 'package:analysis_server/src/services/refactoring/extract_method.dart';
10 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 10 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
11 import 'package:test/test.dart'; 11 import 'package:test/test.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 12 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 13
14 import 'abstract_refactoring.dart'; 14 import 'abstract_refactoring.dart';
15 15
16 main() { 16 main() {
17 defineReflectiveSuite(() { 17 defineReflectiveSuite(() {
18 defineReflectiveTests(ExtractMethodTest); 18 defineReflectiveTests(ExtractMethodTest);
19 }); 19 });
20 } 20 }
21 21
22 @reflectiveTest 22 @reflectiveTest
23 class ExtractMethodTest extends RefactoringTest { 23 class ExtractMethodTest extends RefactoringTest {
24 ExtractMethodRefactoringImpl refactoring; 24 ExtractMethodRefactoringImpl refactoring;
25 25
26 @override
27 bool get enableNewAnalysisDriver => true;
28
29 test_bad_assignmentLeftHandSide() async { 26 test_bad_assignmentLeftHandSide() async {
30 await indexTestUnit(''' 27 await indexTestUnit('''
31 main() { 28 main() {
32 int aaa; 29 int aaa;
33 aaa = 0; 30 aaa = 0;
34 } 31 }
35 '''); 32 ''');
36 _createRefactoringForString('aaa '); 33 _createRefactoringForString('aaa ');
37 return _assertConditionsFatal( 34 return _assertConditionsFatal(
38 'Cannot extract the left-hand side of an assignment.'); 35 'Cannot extract the left-hand side of an assignment.');
(...skipping 2797 matching lines...) Expand 10 before | Expand all | Expand 10 after
2836 * Returns a deep copy of [refactoring] parameters. 2833 * Returns a deep copy of [refactoring] parameters.
2837 * There was a bug masked by updating parameter instances shared between the 2834 * There was a bug masked by updating parameter instances shared between the
2838 * refactoring and the test. 2835 * refactoring and the test.
2839 */ 2836 */
2840 List<RefactoringMethodParameter> _getParametersCopy() { 2837 List<RefactoringMethodParameter> _getParametersCopy() {
2841 return refactoring.parameters.map((p) { 2838 return refactoring.parameters.map((p) {
2842 return new RefactoringMethodParameter(p.kind, p.type, p.name, id: p.id); 2839 return new RefactoringMethodParameter(p.kind, p.type, p.name, id: p.id);
2843 }).toList(); 2840 }).toList();
2844 } 2841 }
2845 } 2842 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698