| Index: pkg/analysis_services/test/correction/fix_test.dart
|
| diff --git a/pkg/analysis_services/test/correction/fix_test.dart b/pkg/analysis_services/test/correction/fix_test.dart
|
| index 3d672fc96c6e008fa8ef229e058aa77268558015..476f3196e9faf4d0ca7486f2eb8a1af62db059f5 100644
|
| --- a/pkg/analysis_services/test/correction/fix_test.dart
|
| +++ b/pkg/analysis_services/test/correction/fix_test.dart
|
| @@ -41,7 +41,9 @@ class FixProcessorTest extends AbstractSingleUnitTest {
|
| // apply to "file"
|
| List<FileEdit> fileEdits = change.fileEdits;
|
| expect(fileEdits, hasLength(1));
|
| - resultCode = _applyEdits(testCode, change.fileEdits[0].edits);
|
| + // TODO(paulberry): should the code under test be responsible for sorting
|
| + // the edits?
|
| + resultCode = Edit.applySorted(testCode, change.fileEdits[0].edits);
|
| // verify
|
| expect(resultCode, expected);
|
| }
|
| @@ -1799,16 +1801,6 @@ main() {
|
| ''');
|
| }
|
|
|
| - String _applyEdits(String code, List<Edit> edits) {
|
| - edits.sort((a, b) => b.offset - a.offset);
|
| - edits.forEach((Edit edit) {
|
| - code = code.substring(0, edit.offset) +
|
| - edit.replacement +
|
| - code.substring(edit.end);
|
| - });
|
| - return code;
|
| - }
|
| -
|
| /**
|
| * Computes fixes and verifies that there is a fix of the given kind.
|
| */
|
|
|