Skip to content

Commit

Permalink
test: add test for StreamSink<MirrorEnum>
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverMira committed Mar 28, 2024
1 parent cb88e40 commit 393b960
Show file tree
Hide file tree
Showing 32 changed files with 1,596 additions and 1 deletion.
57 changes: 57 additions & 0 deletions frb_example/pure_dart/frb_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -3581,6 +3581,10 @@ void frbgen_frb_example_pure_dart_wire_get_message_twin_normal(int64_t port_);
void frbgen_frb_example_pure_dart_wire_is_app_embedded_twin_normal(int64_t port_,
struct wire_cst_application_settings *app_settings);

void frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_normal(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_normal(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_normal(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_tuple_stream_twin_normal(int64_t port_);
Expand Down Expand Up @@ -7950,6 +7954,10 @@ void frbgen_frb_example_pure_dart_wire_get_message_twin_rust_async(int64_t port_
void frbgen_frb_example_pure_dart_wire_is_app_embedded_twin_rust_async(int64_t port_,
struct wire_cst_application_settings *app_settings);

void frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_rust_async(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_rust_async(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_rust_async(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_tuple_stream_twin_rust_async(int64_t port_);
Expand Down Expand Up @@ -8019,6 +8027,16 @@ void frbgen_frb_example_pure_dart_wire_is_app_embedded_twin_rust_async_sse(int64
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_rust_async_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_rust_async_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_rust_async_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
Expand Down Expand Up @@ -8119,6 +8137,16 @@ void frbgen_frb_example_pure_dart_wire_is_app_embedded_twin_sse(int64_t port_,
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
Expand Down Expand Up @@ -8195,6 +8223,10 @@ WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire_get_message_twin_sync(voi

WireSyncRust2DartDco frbgen_frb_example_pure_dart_wire_is_app_embedded_twin_sync(struct wire_cst_application_settings *app_settings);

void frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_sync(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_sync(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_sync(int64_t port_);

void frbgen_frb_example_pure_dart_wire_mirror_tuple_stream_twin_sync(int64_t port_);
Expand Down Expand Up @@ -8255,6 +8287,16 @@ WireSyncRust2DartSse frbgen_frb_example_pure_dart_wire_is_app_embedded_twin_sync
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_sync_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_sync_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
int32_t data_len_);

void frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_sync_sse(int64_t port_,
uint8_t *ptr_,
int32_t rust_vec_len_,
Expand Down Expand Up @@ -12795,6 +12837,8 @@ struct wire_cst_abc_twin_sync *frbgen_frb_example_pure_dart_cst_new_box_autoadd_

struct wire_cst_application_env *frbgen_frb_example_pure_dart_cst_new_box_autoadd_application_env(void);

int32_t *frbgen_frb_example_pure_dart_cst_new_box_autoadd_application_mode(int32_t value);

struct wire_cst_application_settings *frbgen_frb_example_pure_dart_cst_new_box_autoadd_application_settings(void);

struct wire_cst_attribute_twin_normal *frbgen_frb_example_pure_dart_cst_new_box_autoadd_attribute_twin_normal(void);
Expand Down Expand Up @@ -13540,6 +13584,7 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_abc_twin_rust_async);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_abc_twin_sync);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_application_env);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_application_mode);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_application_settings);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_attribute_twin_normal);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_cst_new_box_autoadd_attribute_twin_rust_async);
Expand Down Expand Up @@ -15803,6 +15848,18 @@ static int64_t dummy_method_to_enforce_bundling(void) {
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_loop_back_vec_twin_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_loop_back_vec_twin_sync);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_loop_back_vec_twin_sync_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_normal);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_rust_async);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_rust_async_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_sync);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_enum_stream_twin_sync_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_normal);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_rust_async);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_rust_async_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_sync);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_option_enum_stream_twin_sync_sse);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_normal);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_rust_async);
dummy_var ^= ((int64_t) (void*) frbgen_frb_example_pure_dart_wire_mirror_struct_stream_twin_rust_async_sse);
Expand Down
6 changes: 6 additions & 0 deletions frb_example/pure_dart/lib/src/rust/api/mirror.dart
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ Future<StructWithHashMap> testHashmapWithMirroredValueTwinNormal(
{dynamic hint}) =>
RustLib.instance.api.testHashmapWithMirroredValueTwinNormal(hint: hint);

Stream<ApplicationMode> mirrorEnumStreamTwinNormal({dynamic hint}) =>
RustLib.instance.api.mirrorEnumStreamTwinNormal(hint: hint);

Stream<ApplicationMode?> mirrorOptionEnumStreamTwinNormal({dynamic hint}) =>
RustLib.instance.api.mirrorOptionEnumStreamTwinNormal(hint: hint);

class AnotherTwinNormal {
final String a;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ Future<StructWithHashMap> testHashmapWithMirroredValueTwinRustAsync(
{dynamic hint}) =>
RustLib.instance.api.testHashmapWithMirroredValueTwinRustAsync(hint: hint);

Stream<ApplicationMode> mirrorEnumStreamTwinRustAsync({dynamic hint}) =>
RustLib.instance.api.mirrorEnumStreamTwinRustAsync(hint: hint);

Stream<ApplicationMode?> mirrorOptionEnumStreamTwinRustAsync({dynamic hint}) =>
RustLib.instance.api.mirrorOptionEnumStreamTwinRustAsync(hint: hint);

class AnotherTwinRustAsync {
final String a;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,13 @@ Future<StructWithHashMap> testHashmapWithMirroredValueTwinRustAsyncSse(
RustLib.instance.api
.testHashmapWithMirroredValueTwinRustAsyncSse(hint: hint);

Stream<ApplicationMode> mirrorEnumStreamTwinRustAsyncSse({dynamic hint}) =>
RustLib.instance.api.mirrorEnumStreamTwinRustAsyncSse(hint: hint);

Stream<ApplicationMode?> mirrorOptionEnumStreamTwinRustAsyncSse(
{dynamic hint}) =>
RustLib.instance.api.mirrorOptionEnumStreamTwinRustAsyncSse(hint: hint);

class AnotherTwinRustAsyncSse {
final String a;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ Future<ContainsMirroredSubStructTwinSse> testContainsMirroredSubStructTwinSse(
Future<StructWithHashMap> testHashmapWithMirroredValueTwinSse({dynamic hint}) =>
RustLib.instance.api.testHashmapWithMirroredValueTwinSse(hint: hint);

Stream<ApplicationMode> mirrorEnumStreamTwinSse({dynamic hint}) =>
RustLib.instance.api.mirrorEnumStreamTwinSse(hint: hint);

Stream<ApplicationMode?> mirrorOptionEnumStreamTwinSse({dynamic hint}) =>
RustLib.instance.api.mirrorOptionEnumStreamTwinSse(hint: hint);

class AnotherTwinSse {
final String a;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ ContainsMirroredSubStructTwinSync testContainsMirroredSubStructTwinSync(
StructWithHashMap testHashmapWithMirroredValueTwinSync({dynamic hint}) =>
RustLib.instance.api.testHashmapWithMirroredValueTwinSync(hint: hint);

Stream<ApplicationMode> mirrorEnumStreamTwinSync({dynamic hint}) =>
RustLib.instance.api.mirrorEnumStreamTwinSync(hint: hint);

Stream<ApplicationMode?> mirrorOptionEnumStreamTwinSync({dynamic hint}) =>
RustLib.instance.api.mirrorOptionEnumStreamTwinSync(hint: hint);

class AnotherTwinSync {
final String a;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@ ContainsMirroredSubStructTwinSyncSse testContainsMirroredSubStructTwinSyncSse(
StructWithHashMap testHashmapWithMirroredValueTwinSyncSse({dynamic hint}) =>
RustLib.instance.api.testHashmapWithMirroredValueTwinSyncSse(hint: hint);

Stream<ApplicationMode> mirrorEnumStreamTwinSyncSse({dynamic hint}) =>
RustLib.instance.api.mirrorEnumStreamTwinSyncSse(hint: hint);

Stream<ApplicationMode?> mirrorOptionEnumStreamTwinSyncSse({dynamic hint}) =>
RustLib.instance.api.mirrorOptionEnumStreamTwinSyncSse(hint: hint);

class AnotherTwinSyncSse {
final String a;

Expand Down
Loading

0 comments on commit 393b960

Please sign in to comment.