infix
A JIT-Powered FFI Library for C
Loading...
Searching...
No Matches
006_end_to_end_calls.c File Reference

End-to-end integration tests for the entire FFI call process. More...

#include "common/double_tap.h"
#include "types.h"
#include <infix/infix.h>
#include <math.h>
Include dependency graph for 006_end_to_end_calls.c:

Macros

#define DBLTAP_IMPLEMENTATION
 

Functions

Point move_point (Point p, double dx, double dy)
 A simple function that takes and returns a small struct by value.
 
Point point_callback_handler (Point p)
 A callback handler that receives a Point, modifies it, and returns it.
 
void execute_point_callback (Point(*func_ptr)(Point), Point p)
 A harness function that simulates native C code calling our generated callback.
 
 subtest ("Forward calls with aggregate types (structs)")
 
 subtest ("Reverse calls (callbacks) with aggregate types")
 

Variables

 TEST
 

Detailed Description

End-to-end integration tests for the entire FFI call process.

This is the first test suite to verify the entire pipeline: Signature Parser -> Type System -> ABI Classifier -> JIT Generator -> Call Execution. It focuses on aggregate types (structs, unions) which have the most complex ABI rules.

Macro Definition Documentation

◆ DBLTAP_IMPLEMENTATION

#define DBLTAP_IMPLEMENTATION

Function Documentation

◆ execute_point_callback()

void execute_point_callback ( Point(*)(Point func_ptr,
Point  p 
)

A harness function that simulates native C code calling our generated callback.

◆ move_point()

Point move_point ( Point  p,
double  dx,
double  dy 
)

A simple function that takes and returns a small struct by value.

◆ point_callback_handler()

Point point_callback_handler ( Point  p)

A callback handler that receives a Point, modifies it, and returns it.

◆ subtest() [1/2]

subtest ( "Forward calls with aggregate types (structs)"  )

◆ subtest() [2/2]

subtest ( "Reverse calls (callbacks) with aggregate types"  )

Variable Documentation

◆ TEST

TEST
Initial value:
{
plan(2)
#define plan(count)
Definition double_tap.h:132