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

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

Issue 2394683006: Switch analysis_server to use 'package:test'. (Closed)
Patch Set: Created 4 years, 2 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 library test.services.refactoring.rename_constructor; 5 library test.services.refactoring.rename_constructor;
6 6
7 import 'package:analysis_server/plugin/protocol/protocol.dart'; 7 import 'package:analysis_server/plugin/protocol/protocol.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/refactoring.dart'; 9 import 'package:analysis_server/src/services/refactoring/refactoring.dart';
10 import 'package:analyzer/dart/ast/ast.dart'; 10 import 'package:analyzer/dart/ast/ast.dart';
11 import 'package:analyzer/dart/element/element.dart'; 11 import 'package:analyzer/dart/element/element.dart';
12 import 'package:test/test.dart';
12 import 'package:test_reflective_loader/test_reflective_loader.dart'; 13 import 'package:test_reflective_loader/test_reflective_loader.dart';
13 import 'package:unittest/unittest.dart';
14 14
15 import '../../utils.dart'; 15 import '../../utils.dart';
16 import 'abstract_rename.dart'; 16 import 'abstract_rename.dart';
17 17
18 main() { 18 main() {
19 initializeTestEnvironment(); 19 initializeTestEnvironment();
20 defineReflectiveTests(RenameConstructorTest); 20 defineReflectiveSuite(() {
21 defineReflectiveTests(RenameConstructorTest);
22 });
21 } 23 }
22 24
23 @reflectiveTest 25 @reflectiveTest
24 class RenameConstructorTest extends RenameRefactoringTest { 26 class RenameConstructorTest extends RenameRefactoringTest {
25 test_checkInitialConditions_inSDK() async { 27 test_checkInitialConditions_inSDK() async {
26 indexTestUnit(''' 28 indexTestUnit('''
27 main() { 29 main() {
28 new String.fromCharCodes([]); 30 new String.fromCharCodes([]);
29 } 31 }
30 '''); 32 ''');
(...skipping 212 matching lines...) Expand 10 before | Expand all | Expand 10 after
243 search, (node) => node is ConstructorDeclaration); 245 search, (node) => node is ConstructorDeclaration);
244 createRenameRefactoringForElement(element); 246 createRenameRefactoringForElement(element);
245 } 247 }
246 248
247 void _createConstructorInvocationRefactoring(String search) { 249 void _createConstructorInvocationRefactoring(String search) {
248 ConstructorElement element = findNodeElementAtString( 250 ConstructorElement element = findNodeElementAtString(
249 search, (node) => node is InstanceCreationExpression); 251 search, (node) => node is InstanceCreationExpression);
250 createRenameRefactoringForElement(element); 252 createRenameRefactoringForElement(element);
251 } 253 }
252 } 254 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698