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

Hardened test suite for the high-level signature API. More...

#include "common/double_tap.h"
#include <ctype.h>
#include <infix/infix.h>
#include <string.h>
Include dependency graph for 004_signatures.c:

Macros

#define DBLTAP_IMPLEMENTATION
 

Functions

static void test_type_ok (const char *signature, infix_type_category expected_cat, const char *name)
 Helper subtest to verify that a single type signature string parses correctly.
 
static void test_type_fail (const char *signature, const char *name)
 Helper subtest to verify that an invalid signature string fails to parse.
 
void dummy_handler ()
 
static void normalize_string (char *s)
 
static void test_print_roundtrip (const char *signature)
 
 subtest ("Valid Single Types")
 
 subtest ("Valid Edge Cases (Whitespace, Nesting, Empty)")
 
 subtest ("Valid Full Function Signatures")
 
 subtest ("Invalid Syntax and Logic")
 
 subtest ("Registry Type Introspection")
 
 subtest ("Round trip")
 

Variables

 TEST
 

Detailed Description

Hardened test suite for the high-level signature API.

Copyright (c) 2025 Sanko Robinson

This source code is dual-licensed under the Artistic License 2.0 or the MIT License. You may choose to use this code under the terms of either license.

SPDX-License-Identifier: (Artistic-2.0 OR MIT)

The documentation blocks within this file are licensed under the Creative Commons Attribution 4.0 International License (CC BY 4.0).

SPDX-License-Identifier: CC-BY-4.0

Macro Definition Documentation

◆ DBLTAP_IMPLEMENTATION

#define DBLTAP_IMPLEMENTATION

Function Documentation

◆ dummy_handler()

void dummy_handler ( )

◆ normalize_string()

static void normalize_string ( char *  s)
static

◆ subtest() [1/6]

subtest ( "Invalid Syntax and Logic"  )

◆ subtest() [2/6]

subtest ( "Registry Type Introspection"  )

◆ subtest() [3/6]

subtest ( "Round trip"  )

◆ subtest() [4/6]

subtest ( "Valid Edge Cases (Whitespace, Nesting, Empty)"  )

◆ subtest() [5/6]

subtest ( "Valid Full Function Signatures"  )

◆ subtest() [6/6]

subtest ( "Valid Single Types"  )

◆ test_print_roundtrip()

static void test_print_roundtrip ( const char *  signature)
static

◆ test_type_fail()

static void test_type_fail ( const char *  signature,
const char *  name 
)
static

Helper subtest to verify that an invalid signature string fails to parse.

◆ test_type_ok()

static void test_type_ok ( const char *  signature,
infix_type_category  expected_cat,
const char *  name 
)
static

Helper subtest to verify that a single type signature string parses correctly.

Variable Documentation

◆ TEST

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