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

Unit test for the Manual API (infix_type_create_* functions). More...

#include "common/compat_c23.h"
#include "common/double_tap.h"
#include <infix/infix.h>
#include <stddef.h>
#include <stdint.h>
Include dependency graph for 003_type_system_api.c:

Classes

struct  TestStruct
union  TestUnion

Macros

#define DBLTAP_IMPLEMENTATION

Typedefs

typedef int64_t TestArray[10]

Functions

 subtest ("infix_type_create_struct API validation")
 subtest ("infix_type_create_union API validation")
 subtest ("infix_type_create_array API validation")
 subtest ("infix_type_create_enum API validation")
 subtest ("Forward trampoline introspection API")

Variables

 TEST

Detailed Description

Unit test for the Manual API (infix_type_create_* functions).

This test file validates the correctness of the programmatic type creation API. Its primary goal is to ensure that the infix_type objects created by these functions have a memory layout (size and alignment) that perfectly matches the layout produced by the C compiler for equivalent native types.

It tests:

This test is crucial for guaranteeing that the library's internal understanding of C's data layout rules is accurate.

Macro Definition Documentation

◆ DBLTAP_IMPLEMENTATION

#define DBLTAP_IMPLEMENTATION

Typedef Documentation

◆ TestArray

typedef int64_t TestArray[10]

Function Documentation

◆ subtest() [1/5]

subtest ( "Forward trampoline introspection API" )

◆ subtest() [2/5]

subtest ( "infix_type_create_array API validation" )

◆ subtest() [3/5]

subtest ( "infix_type_create_enum API validation" )

◆ subtest() [4/5]

subtest ( "infix_type_create_struct API validation" )

◆ subtest() [5/5]

subtest ( "infix_type_create_union API validation" )

Variable Documentation

◆ TEST

TEST
Initial value:
{
plan(5)
#define plan(count)
Definition double_tap.h:192