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

Unit test for the registry's hash table auto-scaling (rehashing). More...

#include "common/double_tap.h"
#include <infix/infix.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
Include dependency graph for 010_registry_scaling.c:

Macros

#define DBLTAP_IMPLEMENTATION
 

Functions

 subtest ("Incremental Growth & Rehash Consistency")
 
 subtest ("Bulk Stress Test")
 
 subtest ("Cloning Scaled Registry")
 

Variables

 TEST
 

Detailed Description

Unit test for the registry's hash table auto-scaling (rehashing).

This test verifies that the infix_registry_t correctly resizes its internal hash table when the load factor threshold is exceeded.

It tests:

  1. Data Integrity: Ensuring no types are lost during the rehash process.
  2. Lookup Correctness: Verifying infix_registry_lookup_type finds items in the new bucket locations.
  3. Iterator Stability: Ensuring iteration visits all items after a resize.
  4. Cloning: Verifying that cloning a large, resized registry works.

Macro Definition Documentation

◆ DBLTAP_IMPLEMENTATION

#define DBLTAP_IMPLEMENTATION

Function Documentation

◆ subtest() [1/3]

subtest ( "Bulk Stress Test"  )

◆ subtest() [2/3]

subtest ( "Cloning Scaled Registry"  )

◆ subtest() [3/3]

subtest ( "Incremental Growth & Rehash Consistency"  )

Variable Documentation

◆ TEST

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