| 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_unit_member; | 5 library test.services.refactoring.rename_unit_member; |
| 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:test/test.dart'; | 9 import 'package:test/test.dart'; |
| 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; | 10 import 'package:test_reflective_loader/test_reflective_loader.dart'; |
| 11 | 11 |
| 12 import 'abstract_rename.dart'; | 12 import 'abstract_rename.dart'; |
| 13 | 13 |
| 14 main() { | 14 main() { |
| 15 defineReflectiveSuite(() { | 15 defineReflectiveSuite(() { |
| 16 defineReflectiveTests(RenameUnitMemberTest); | 16 defineReflectiveTests(RenameUnitMemberTest); |
| 17 defineReflectiveTests(RenameUnitMemberTest_Driver); |
| 17 }); | 18 }); |
| 18 } | 19 } |
| 19 | 20 |
| 20 @reflectiveTest | 21 @reflectiveTest |
| 21 class RenameUnitMemberTest extends RenameRefactoringTest { | 22 class RenameUnitMemberTest extends RenameRefactoringTest { |
| 22 test_checkFinalConditions_hasTopLevel_ClassElement() async { | 23 test_checkFinalConditions_hasTopLevel_ClassElement() async { |
| 23 await indexTestUnit(''' | 24 await indexTestUnit(''' |
| 24 class Test {} | 25 class Test {} |
| 25 class NewName {} // existing | 26 class NewName {} // existing |
| 26 '''); | 27 '''); |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 616 return assertSuccessfulRefactoring(''' | 617 return assertSuccessfulRefactoring(''' |
| 617 int newName = 0; | 618 int newName = 0; |
| 618 main() { | 619 main() { |
| 619 print(newName); | 620 print(newName); |
| 620 newName = 1; | 621 newName = 1; |
| 621 newName += 2; | 622 newName += 2; |
| 622 } | 623 } |
| 623 '''); | 624 '''); |
| 624 } | 625 } |
| 625 } | 626 } |
| 627 |
| 628 @reflectiveTest |
| 629 class RenameUnitMemberTest_Driver extends RenameUnitMemberTest { |
| 630 @override |
| 631 bool get enableNewAnalysisDriver => true; |
| 632 |
| 633 @failingTest |
| 634 @override |
| 635 test_createChange_FunctionElement_imported() { |
| 636 return test_createChange_FunctionElement_imported(); |
| 637 } |
| 638 } |
| OLD | NEW |