| Index: pkg/analysis_server/test/edit/format_test.dart
|
| diff --git a/pkg/analysis_server/test/edit/format_test.dart b/pkg/analysis_server/test/edit/format_test.dart
|
| index 6a8e870e099a56719e7252efc45d765546dc2b33..1bd9f709d35503b5522f35cddb4eca40e486dabd 100644
|
| --- a/pkg/analysis_server/test/edit/format_test.dart
|
| +++ b/pkg/analysis_server/test/edit/format_test.dart
|
| @@ -46,6 +46,26 @@ main() {
|
| });
|
| }
|
|
|
| + Future test_formatNoSelection() async {
|
| + addTestFile('''
|
| +main() { int x = 3; }
|
| +''');
|
| + await waitForTasksFinished();
|
| + EditFormatResult formatResult = _formatAt(0, 0);
|
| +
|
| + expect(formatResult.edits, isNotNull);
|
| + expect(formatResult.edits, hasLength(1));
|
| +
|
| + SourceEdit edit = formatResult.edits[0];
|
| + expect(edit.replacement, equals('''
|
| +main() {
|
| + int x = 3;
|
| +}
|
| +'''));
|
| + expect(formatResult.selectionOffset, equals(0));
|
| + expect(formatResult.selectionLength, equals(0));
|
| + }
|
| +
|
| Future test_formatSimple() {
|
| addTestFile('''
|
| main() { int x = 3; }
|
|
|