| 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.edit.refactoring; | 5 library test.edit.refactoring; |
| 6 | 6 |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 | 8 |
| 9 import 'package:analysis_server/src/edit/edit_domain.dart'; | 9 import 'package:analysis_server/src/edit/edit_domain.dart'; |
| 10 import 'package:analysis_server/src/protocol.dart'; | 10 import 'package:analysis_server/src/protocol.dart'; |
| (...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 782 test_class_validateOnly() { | 782 test_class_validateOnly() { |
| 783 addTestFile(''' | 783 addTestFile(''' |
| 784 class Test {} | 784 class Test {} |
| 785 main() { | 785 main() { |
| 786 Test v; | 786 Test v; |
| 787 } | 787 } |
| 788 '''); | 788 '''); |
| 789 return getRefactoringResult(() { | 789 return getRefactoringResult(() { |
| 790 return sendRenameRequest('Test {}', 'NewName', true); | 790 return sendRenameRequest('Test {}', 'NewName', true); |
| 791 }).then((result) { | 791 }).then((result) { |
| 792 RenameFeedback feedback = result.feedback; |
| 792 assertResultProblemsOK(result); | 793 assertResultProblemsOK(result); |
| 794 expect(feedback.elementKindName, 'class'); |
| 795 expect(feedback.oldName, 'Test'); |
| 793 expect(result.change, isNull); | 796 expect(result.change, isNull); |
| 794 }); | 797 }); |
| 795 } | 798 } |
| 796 | 799 |
| 797 test_class_warning() { | 800 test_class_warning() { |
| 798 addTestFile(''' | 801 addTestFile(''' |
| 799 class Test {} | 802 class Test {} |
| 800 main() { | 803 main() { |
| 801 Test v; | 804 Test v; |
| 802 } | 805 } |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1052 } | 1055 } |
| 1053 | 1056 |
| 1054 @override | 1057 @override |
| 1055 void setUp() { | 1058 void setUp() { |
| 1056 super.setUp(); | 1059 super.setUp(); |
| 1057 server.handlers = [new EditDomainHandler(server),]; | 1060 server.handlers = [new EditDomainHandler(server),]; |
| 1058 createProject(); | 1061 createProject(); |
| 1059 handler = new EditDomainHandler(server); | 1062 handler = new EditDomainHandler(server); |
| 1060 } | 1063 } |
| 1061 } | 1064 } |
| OLD | NEW |