Skip to content

[pigeon] Eliminate some of the test pigeons #3213

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 0 additions & 23 deletions packages/pigeon/pigeons/async_handlers.dart

This file was deleted.

58 changes: 58 additions & 0 deletions packages/pigeon/pigeons/core_tests.dart
Original file line number Diff line number Diff line change
Expand Up @@ -538,10 +538,68 @@ abstract class FlutterIntegrationCoreApi {
@ObjCSelector('echoNullableMap:')
@SwiftFunction('echoNullable(_:)')
Map<String?, Object?>? echoNullableMap(Map<String?, Object?>? aMap);

// ========== Async tests ==========
// These are minimal since async FlutterApi only changes Dart generation.
// Currently they aren't integration tested, but having them here ensures
// analysis coverage.

/// A no-op function taking no arguments and returning no value, to sanity
/// test basic asynchronous calling.
@async
void noopAsync();

/// Returns the passed in generic Object asynchronously.
@async
@ObjCSelector('echoAsyncString:')
@SwiftFunction('echoAsync(_:)')
String echoAsyncString(String aString);
}

/// An API that can be implemented for minimal, compile-only tests.
//
// This is also here to test that multiple host APIs can be generated
// successfully in all languages (e.g., in Java where it requires having a
// wrapper class).
@HostApi()
abstract class HostTrivialApi {
void noop();
}

/// A simple API implemented in some unit tests.
//
// This is separate from HostIntegrationCoreApi to avoid having to update a
// lot of unit tests every time we add something to the integration test API.
// TODO(stuartmorgan): Restructure the unit tests to reduce the number of
// different APIs we define.
@HostApi()
abstract class HostSmallApi {
@async
@ObjCSelector('echoString:')
String echo(String aString);

@async
void voidVoid();
}

/// A simple API called in some unit tests.
//
// This is separate from FlutterIntegrationCoreApi to allow for incrementally
// moving from the previous fragmented unit test structure to something more
// unified.
// TODO(stuartmorgan): Restructure the unit tests to reduce the number of
// different APIs we define.
@FlutterApi()
abstract class FlutterSmallApi {
@ObjCSelector('echoWrappedList:')
@SwiftFunction('echo(_:)')
TestMessage echoWrappedList(TestMessage msg);
}

/// A data class containing a List, used in unit tests.
// TODO(stuartmorgan): Evaluate whether these unit tests are still useful; see
// TODOs above about restructring.
class TestMessage {
// ignore: always_specify_types, strict_raw_type
List? testList;
}
20 changes: 0 additions & 20 deletions packages/pigeon/pigeons/enum_args.dart

This file was deleted.

23 changes: 0 additions & 23 deletions packages/pigeon/pigeons/host2flutter.dart

This file was deleted.

21 changes: 0 additions & 21 deletions packages/pigeon/pigeons/java_double_host_api.dart

This file was deleted.

20 changes: 0 additions & 20 deletions packages/pigeon/pigeons/list.dart

This file was deleted.

14 changes: 0 additions & 14 deletions packages/pigeon/pigeons/void_arg_flutter.dart

This file was deleted.

14 changes: 0 additions & 14 deletions packages/pigeon/pigeons/void_arg_host.dart

This file was deleted.

14 changes: 0 additions & 14 deletions packages/pigeon/pigeons/voidflutter.dart

This file was deleted.

14 changes: 0 additions & 14 deletions packages/pigeon/pigeons/voidhost.dart

This file was deleted.

Loading