| Index: pkg/analysis_server/test/services/correction/sort_members_test.dart
|
| diff --git a/pkg/analysis_server/test/services/correction/sort_members_test.dart b/pkg/analysis_server/test/services/correction/sort_members_test.dart
|
| index 48ecbffcd11fb63399d022eb4a659aeed60b27a4..f0accb645c8fb8af7e8f7d282bfedd72c9fb55e0 100644
|
| --- a/pkg/analysis_server/test/services/correction/sort_members_test.dart
|
| +++ b/pkg/analysis_server/test/services/correction/sort_members_test.dart
|
| @@ -675,6 +675,24 @@ int c;
|
| ''');
|
| }
|
|
|
| + void test_unitMembers_topLevelVariable_withConst() {
|
| + _parseTestUnit(r'''
|
| +int c;
|
| +int a;
|
| +const B = 2;
|
| +int b;
|
| +const A = 1;
|
| +''');
|
| + // validate change
|
| + _assertSort(r'''
|
| +const A = 1;
|
| +const B = 2;
|
| +int a;
|
| +int b;
|
| +int c;
|
| +''');
|
| + }
|
| +
|
| void _assertSort(String expectedCode) {
|
| MemberSorter sorter = new MemberSorter(testCode, testUnit);
|
| List<SourceEdit> edits = sorter.sort();
|
|
|