Add a test to move top level to file for Extension Types

Change-Id: Ie21a2d5f47a612d519480fe17bb2d25aba69f2dd
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/332621
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Keerti Parthasarathy <keertip@google.com>
This commit is contained in:
Keerti Parthasarathy 2023-10-27 20:43:09 +00:00 committed by Commit Queue
parent 03e0e6d18a
commit ed56ca29a6

View file

@ -1053,6 +1053,31 @@ class ClassToMove {}
>>>>>>>>>> lib/main.dart
class A {}
class B {}
''';
await _singleDeclaration(
originalSource: originalSource,
expected: expected,
declarationName: declarationName,
);
}
Future<void> test_kind_extensionType() async {
var originalSource = '''
class A {}
extensionType ExtensionTypeToMove^(int i) {}
class B {}
''';
var declarationName = 'ExtensionTypeToMove';
var expected = '''
>>>>>>>>>> lib/extension_type_to_move.dart created
extensionType ExtensionTypeToMove(int i) {}
>>>>>>>>>> lib/main.dart
class A {}
class B {}
''';
await _singleDeclaration(