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_label; | 5 library test.services.refactoring.rename_label; |
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(RenameLabelTest); | 16 runReflectiveTests(RenameLabelTest); |
17 } | 17 } |
18 | 18 |
19 | 19 |
20 @ReflectiveTestCase() | 20 @reflectiveTest |
21 class RenameLabelTest extends RenameRefactoringTest { | 21 class RenameLabelTest extends RenameRefactoringTest { |
22 test_checkNewName_LocalVariableElement() { | 22 test_checkNewName_LocalVariableElement() { |
23 indexTestUnit(''' | 23 indexTestUnit(''' |
24 main() { | 24 main() { |
25 test: | 25 test: |
26 while (true) { | 26 while (true) { |
27 break test; | 27 break test; |
28 } | 28 } |
29 } | 29 } |
30 '''); | 30 '''); |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 break test; | 79 break test; |
80 } | 80 } |
81 } | 81 } |
82 '''); | 82 '''); |
83 // configure refactoring | 83 // configure refactoring |
84 createRenameRefactoringAtString('test:'); | 84 createRenameRefactoringAtString('test:'); |
85 // old name | 85 // old name |
86 expect(refactoring.oldName, 'test'); | 86 expect(refactoring.oldName, 'test'); |
87 } | 87 } |
88 } | 88 } |
OLD | NEW |