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

Side by Side Diff: pkg/analysis_server/test/services/refactoring/rename_constructor_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 'package:analysis_server/protocol/protocol_generated.dart'; 5 import 'package:analysis_server/protocol/protocol_generated.dart';
6 import 'package:analysis_server/src/services/correction/status.dart'; 6 import 'package:analysis_server/src/services/correction/status.dart';
7 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; 7 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
8 import 'package:analyzer/dart/ast/ast.dart'; 8 import 'package:analyzer/dart/ast/ast.dart';
9 import 'package:analyzer/dart/element/element.dart'; 9 import 'package:analyzer/dart/element/element.dart';
10 import 'package:test/test.dart'; 10 import 'package:test/test.dart';
11 import 'package:test_reflective_loader/test_reflective_loader.dart'; 11 import 'package:test_reflective_loader/test_reflective_loader.dart';
12 12
13 import 'abstract_rename.dart'; 13 import 'abstract_rename.dart';
14 14
15 main() { 15 main() {
16 defineReflectiveSuite(() { 16 defineReflectiveSuite(() {
17 defineReflectiveTests(RenameConstructorTest); 17 defineReflectiveTests(RenameConstructorTest);
18 }); 18 });
19 } 19 }
20 20
21 @reflectiveTest 21 @reflectiveTest
22 class RenameConstructorTest extends RenameRefactoringTest { 22 class RenameConstructorTest extends RenameRefactoringTest {
23 @override
24 bool get enableNewAnalysisDriver => true;
25
26 test_checkInitialConditions_inSDK() async { 23 test_checkInitialConditions_inSDK() async {
27 await indexTestUnit(''' 24 await indexTestUnit('''
28 main() { 25 main() {
29 new String.fromCharCodes([]); 26 new String.fromCharCodes([]);
30 } 27 }
31 '''); 28 ''');
32 createRenameRefactoringAtString('fromCharCodes('); 29 createRenameRefactoringAtString('fromCharCodes(');
33 // check status 30 // check status
34 refactoring.newName = 'newName'; 31 refactoring.newName = 'newName';
35 RefactoringStatus status = await refactoring.checkInitialConditions(); 32 RefactoringStatus status = await refactoring.checkInitialConditions();
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
245 search, (node) => node is ConstructorDeclaration); 242 search, (node) => node is ConstructorDeclaration);
246 createRenameRefactoringForElement(element); 243 createRenameRefactoringForElement(element);
247 } 244 }
248 245
249 void _createConstructorInvocationRefactoring(String search) { 246 void _createConstructorInvocationRefactoring(String search) {
250 ConstructorElement element = findNodeElementAtString( 247 ConstructorElement element = findNodeElementAtString(
251 search, (node) => node is InstanceCreationExpression); 248 search, (node) => node is InstanceCreationExpression);
252 createRenameRefactoringForElement(element); 249 createRenameRefactoringForElement(element);
253 } 250 }
254 } 251 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698