Skip to content
Merged
Changes from 1 commit
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
Prev Previous commit
Next Next commit
class with collections of null
  • Loading branch information
tarrinneal committed Jun 30, 2023
commit 7665c10ffacb852b0ac7ea43de0c8117329d803b
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,34 @@ void runPigeonIntegrationTests(TargetGenerator targetGenerator) {
// See https://github.com/flutter/flutter/issues/118733
skip: targetGenerator == TargetGenerator.objc);

testWidgets('Classes with list of null serialize and deserialize correctly',
(WidgetTester _) async {
final HostIntegrationCoreApi api = HostIntegrationCoreApi();

final AllNullableTypes nullableListTypes =
AllNullableTypes(aNullableList: <String?>['String', null]);

final AllNullableTypes? echoNullFilledObject =
await api.echoAllNullableTypes(nullableListTypes);

expect(
echoNullFilledObject?.aNullableList, nullableListTypes.aNullableList);
});

testWidgets('Classes with map of null serialize and deserialize correctly',
(WidgetTester _) async {
final HostIntegrationCoreApi api = HostIntegrationCoreApi();

final AllNullableTypes nullableListTypes = AllNullableTypes(
aNullableMap: <String?, String?>{'String': 'string', 'null': null});

final AllNullableTypes? echoNullFilledObject =
await api.echoAllNullableTypes(nullableListTypes);

expect(
echoNullFilledObject?.aNullableMap, nullableListTypes.aNullableMap);
});

testWidgets('errors are returned correctly', (WidgetTester _) async {
final HostIntegrationCoreApi api = HostIntegrationCoreApi();

Expand Down