| 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; | 5 library test.services.refactoring.rename; |
| 6 | 6 |
| 7 import 'package:analysis_server/src/protocol.dart' hide Element; | 7 import 'package:analysis_server/src/protocol.dart' hide Element; |
| 8 import 'package:analysis_server/src/services/correction/namespace.dart'; | 8 import 'package:analysis_server/src/services/correction/namespace.dart'; |
| 9 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; | 9 import 'package:analysis_server/src/services/refactoring/refactoring.dart'; |
| 10 import 'package:analyzer/src/generated/ast.dart'; | 10 import 'package:analyzer/src/generated/ast.dart'; |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 68 SourceEdit findEditById(String id) { | 68 SourceEdit findEditById(String id) { |
| 69 for (SourceFileEdit fileEdit in refactoringChange.edits) { | 69 for (SourceFileEdit fileEdit in refactoringChange.edits) { |
| 70 for (SourceEdit edit in fileEdit.edits) { | 70 for (SourceEdit edit in fileEdit.edits) { |
| 71 if (edit.id == id) { | 71 if (edit.id == id) { |
| 72 return edit; | 72 return edit; |
| 73 } | 73 } |
| 74 } | 74 } |
| 75 } | 75 } |
| 76 return null; | 76 return null; |
| 77 } | 77 } |
| 78 | |
| 79 // /** | |
| 80 // * Asserts result of applying [change] to [testCode]. | |
| 81 // */ | |
| 82 // void assertTestChangeResult(Change change, String expected) | |
| 83 // { | |
| 84 // assertChangeResult(change, testSource, expected); | |
| 85 // } | |
| 86 // | |
| 87 // /** | |
| 88 // * Asserts result of applying [change] to [source]. | |
| 89 // */ | |
| 90 // void assertChangeResult(Change change, Source source, String expected) | |
| 91 // { | |
| 92 // SourceChange sourceChange = getSourceChange(compositeChange, source); | |
| 93 // assertNotNull("No change for: " + source.toString(), sourceChange); | |
| 94 // String sourceResult = getChangeResult(context, source, sourceChange); | |
| 95 // assertEquals(expected, sourceResult); | |
| 96 //// AnalysisContext context = getAnalysisContext(); | |
| 97 //// assertChangeResult(context, compositeChange, source, expected); | |
| 98 // } | |
| 99 } | 78 } |
| OLD | NEW |