OLD | NEW |
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_local; | 5 library test.services.refactoring.rename_local; |
6 | 6 |
7 import 'package:analysis_server/src/protocol.dart'; | 7 import 'package:analysis_server/src/protocol.dart'; |
8 import 'package:unittest/unittest.dart'; | 8 import 'package:unittest/unittest.dart'; |
9 | 9 |
10 import '../../reflective_tests.dart'; | 10 import '../../reflective_tests.dart'; |
11 import 'abstract_rename.dart'; | 11 import 'abstract_rename.dart'; |
12 | 12 |
13 | 13 |
14 main() { | 14 main() { |
15 groupSep = ' | '; | 15 groupSep = ' | '; |
16 runReflectiveTests(RenameLocalTest); | 16 runReflectiveTests(RenameLocalTest); |
17 } | 17 } |
18 | 18 |
19 | 19 |
20 @ReflectiveTestCase() | 20 @reflectiveTest |
21 class RenameLocalTest extends RenameRefactoringTest { | 21 class RenameLocalTest extends RenameRefactoringTest { |
22 test_checkFinalConditions_hasLocalFunction_after() { | 22 test_checkFinalConditions_hasLocalFunction_after() { |
23 indexTestUnit(''' | 23 indexTestUnit(''' |
24 main() { | 24 main() { |
25 int test = 0; | 25 int test = 0; |
26 newName() => 1; | 26 newName() => 1; |
27 } | 27 } |
28 '''); | 28 '''); |
29 createRenameRefactoringAtString('test = 0'); | 29 createRenameRefactoringAtString('test = 0'); |
30 // check status | 30 // check status |
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 main() { | 452 main() { |
453 int test = 0; | 453 int test = 0; |
454 } | 454 } |
455 '''); | 455 '''); |
456 // configure refactoring | 456 // configure refactoring |
457 createRenameRefactoringAtString('test = 0'); | 457 createRenameRefactoringAtString('test = 0'); |
458 // old name | 458 // old name |
459 expect(refactoring.oldName, 'test'); | 459 expect(refactoring.oldName, 'test'); |
460 } | 460 } |
461 } | 461 } |
OLD | NEW |