| 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/src/protocol.dart'; | 7 import 'package:analysis_server/src/protocol.dart'; |
| 8 import '../../reflective_tests.dart'; | 8 import '../../reflective_tests.dart'; |
| 9 import 'package:unittest/unittest.dart'; | 9 import 'package:unittest/unittest.dart'; |
| 10 | 10 |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 } | 165 } |
| 166 '''); | 166 '''); |
| 167 createRenameRefactoringAtString('Test {}'); | 167 createRenameRefactoringAtString('Test {}'); |
| 168 // check status | 168 // check status |
| 169 refactoring.newName = 'NewName'; | 169 refactoring.newName = 'NewName'; |
| 170 return refactoring.checkFinalConditions().then((status) { | 170 return refactoring.checkFinalConditions().then((status) { |
| 171 assertRefactoringStatusOK(status); | 171 assertRefactoringStatusOK(status); |
| 172 }); | 172 }); |
| 173 } | 173 } |
| 174 | 174 |
| 175 test_checkFinalConditions_shadowsInSubClass_notImportedLib() { | 175 xtest_checkFinalConditions_shadowsInSubClass_notImportedLib() { |
| 176 indexTestUnit(''' | 176 indexTestUnit(''' |
| 177 class Test {} | 177 class Test {} |
| 178 '''); | 178 '''); |
| 179 indexUnit('/lib.dart', ''' | 179 indexUnit('/lib.dart', ''' |
| 180 library my.lib; | 180 library my.lib; |
| 181 class A { | 181 class A { |
| 182 NewName() {} | 182 NewName() {} |
| 183 } | 183 } |
| 184 class B extends A { | 184 class B extends A { |
| 185 main() { | 185 main() { |
| (...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 494 return assertSuccessfulRefactoring(''' | 494 return assertSuccessfulRefactoring(''' |
| 495 int newName = 0; | 495 int newName = 0; |
| 496 main() { | 496 main() { |
| 497 print(newName); | 497 print(newName); |
| 498 newName = 1; | 498 newName = 1; |
| 499 newName += 2; | 499 newName += 2; |
| 500 } | 500 } |
| 501 '''); | 501 '''); |
| 502 } | 502 } |
| 503 } | 503 } |
| OLD | NEW |