Sort declarations in resynthesize_common.dart

Change-Id: Iec0312bf5dc0abdbe9729c90bebade65b2ba3c74
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/102982
Auto-Submit: Paul Berry <paulberry@google.com>
Commit-Queue: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
diff --git a/pkg/analyzer/test/src/summary/resynthesize_common.dart b/pkg/analyzer/test/src/summary/resynthesize_common.dart
index 0861f94..b8536df 100644
--- a/pkg/analyzer/test/src/summary/resynthesize_common.dart
+++ b/pkg/analyzer/test/src/summary/resynthesize_common.dart
@@ -2432,6 +2432,26 @@
         withConstElements: false);
   }
 
+  test_compilationUnit_nnbd_disabled_via_dart_directive() async {
+    featureSet = enableNnbd;
+    var library = await checkLibrary('''
+// @dart=2.2
+''');
+    expect(library.isNonNullableByDefault, isFalse);
+  }
+
+  test_compilationUnit_nnbd_disabled_via_feature_set() async {
+    featureSet = disableNnbd;
+    var library = await checkLibrary('');
+    expect(library.isNonNullableByDefault, isFalse);
+  }
+
+  test_compilationUnit_nnbd_enabled() async {
+    featureSet = enableNnbd;
+    var library = await checkLibrary('');
+    expect(library.isNonNullableByDefault, isTrue);
+  }
+
   test_const_classField() async {
     var library = await checkLibrary(r'''
 class C {
@@ -7087,26 +7107,6 @@
     }
   }
 
-  test_compilationUnit_nnbd_disabled_via_dart_directive() async {
-    featureSet = enableNnbd;
-    var library = await checkLibrary('''
-// @dart=2.2
-''');
-    expect(library.isNonNullableByDefault, isFalse);
-  }
-
-  test_compilationUnit_nnbd_disabled_via_feature_set() async {
-    featureSet = disableNnbd;
-    var library = await checkLibrary('');
-    expect(library.isNonNullableByDefault, isFalse);
-  }
-
-  test_compilationUnit_nnbd_enabled() async {
-    featureSet = enableNnbd;
-    var library = await checkLibrary('');
-    expect(library.isNonNullableByDefault, isTrue);
-  }
-
   test_inferredType_implicitCreation() async {
     var library = await checkLibrary(r'''
 class A {