|
infix
A JIT-Powered FFI Library for C
|
Unit test for basic forward trampoline calls with simple function signatures. More...
Macros | |
| #define | DBLTAP_IMPLEMENTATION |
Functions | |
| int | add_ints (int a, int b) |
| float | multiply_floats (float a, float b) |
| void | do_nothing () |
| bool | is_negative (int val) |
| subtest ("int(int, int)") | |
| subtest ("float(float, float)") | |
| subtest ("void(void)") | |
| subtest ("Argument Sign-Extension: bool(int)") | |
Variables | |
| TEST | |
Unit test for basic forward trampoline calls with simple function signatures.
This test file verifies that the infix library can correctly create and execute forward trampolines for functions with simple, primitive arguments and return types. It covers:
int(int, int): Basic integer arithmetic.float(float, float): Basic floating-point arithmetic.void(void): Functions with no arguments or return value.bool(int): A test to specifically verify correct sign-extension of integer arguments that are smaller than a full register.For each signature, it tests both bound and unbound trampolines to ensure both creation paths and calling conventions are working correctly.
| #define DBLTAP_IMPLEMENTATION |
| int add_ints | ( | int | a, |
| int | b | ||
| ) |
| void do_nothing | ( | ) |
| bool is_negative | ( | int | val | ) |
| float multiply_floats | ( | float | a, |
| float | b | ||
| ) |
| subtest | ( | "Argument Sign-Extension: bool(int)" | ) |
| subtest | ( | "float(float, float)" | ) |
| subtest | ( | "int(int, int)" | ) |
| subtest | ( | "void(void)" | ) |