|
| static Point | add_points (Point p1, Point p2, int dummy_arg) |
| |
| static void | move_point (Point *p, int32_t dx, int32_t dy) |
| |
| static double | sum_mixed_types (double a, int b, float c, int d, double e, int f, float g) |
| |
| static const char * | check_string (const char *s, int64_t *out_len) |
| |
| static int64_t | sum_small_ints (unsigned char uc, short ss, uint32_t ui, int64_t ll) |
| |
| static double | get_line_length (Line l) |
| |
| static int | takes_empty_struct (EmptyStruct es, int tag) |
| |
| static int | execute_callback (IntFunc func, int value) |
| |
| static infix_direct_value_t | mock_marshaller_int (void *source_obj) |
| |
| static infix_direct_value_t | mock_marshaller_double (void *source_obj) |
| |
| static infix_direct_value_t | mock_marshaller_string (void *source_obj) |
| |
| static void | mock_marshaller_point (void *source_obj, void *dest_buffer, const infix_type *type) |
| |
| static void | mock_writeback_point (void *source_obj, void *c_data_ptr, const infix_type *type) |
| |
| static void | mock_writeback_int64 (void *source_obj, void *c_data_ptr, const infix_type *type) |
| |
| static void | mock_marshaller_line (void *source_obj, void *dest_buffer, const infix_type *type) |
| |
| static infix_direct_value_t | mock_marshaller_func_ptr (void *source_obj) |
| |
| static int | mock_c_callback (int a) |
| |
| | ok (infix_register_types(reg, "@Point = { x: double, y: double };" "@Line = { start: @Point, end: @Point };" "@Empty = {};" "@IntFunc = (int)->int;")==INFIX_SUCCESS, "Successfully registered all test types") |
| |
| | subtest ("Test struct-by-value with add_points") |
| |
| | subtest ("Test in-out pointer with move_point") |
| |
| | subtest ("Test mixed types and stack arguments") |
| |
| | subtest ("Test C strings and pointer out-parameters") |
| |
| | subtest ("Test various small integer types") |
| |
| | subtest ("Test nested structs") |
| |
| | subtest ("Test empty structs") |
| |
| | subtest ("Test function pointer arguments") |
| |
| | infix_registry_destroy (reg) |
| |
| | done () |
| |
Test suite for the high-performance direct marshalling API.
This test acts as a "mock" language binding to validate the direct marshalling feature. It defines its own simple object system (MockObject) and provides marshaller/write-back handlers to convert between these mock objects and native C types.