31 EXPECT(head == &n1 && tail == &n1);
34 EXPECT(head == &n1 && tail == &n2);
39 EXPECT(head == &n2 && tail == &n2);
Context detection, utilities, compiler abstractions, and data structures.
Sized string (string slice) definitions and helper macros.
Core type definitions and fixed-width aliases.
#define IS_POW2_OR_ZERO(x)
Checks if a given integer is a power of 2 (or zero).
#define ALIGN_UP_POW2(x, p)
Aligns a value UP to the nearest power of 2.
#define DLL_PUSH_BACK(f, l, n)
Pushes a node to the back of a doubly linked list.
#define DLL_REMOVE(f, l, n)
Removes a node from a doubly linked list.
static String8 str8_skip(String8 str, usize amt)
Returns a substring by skipping the first amt bytes of the input string.
static String8 str8_substr(String8 str, usize first, usize one_past_last)
Returns a substring spanning from first to one_past_last indices.
static String8 str8_prefix(String8 str, usize size)
Returns a substring containing the first size bytes of the input string.
#define STR8(s)
Wraps a C string literal into a String8 struct at compile time.
#define MIN(a, b)
Returns the minimum of two values (Standard C fallback).
#define CLAMP(val, min, max)
Clamps a value between a minimum and a maximum (Standard C fallback).
#define MAX(a, b)
Returns the maximum of two values (Standard C fallback).
A sized UTF-8 string slice.
Dummy node used for testing intrusive linked list macros.
A lightweight, dependency-free unit testing harness.
#define EXPECT_STR8_EQ(a, b)
Helper to test if two String8 objects match exactly.
#define EXPECT(cond)
Evaluates a condition. If it fails, prints the file/line and increments the fail count.
#define TEST_CASE(name)
Defines a test case function.