31 EXPECT(head == &n1 && tail == &n1);
34 EXPECT(head == &n1 && tail == &n2);
39 EXPECT(head == &n2 && tail == &n2);
Context detection, compiler abstractions, utility macros, and data structures.
Sized UTF-8 string slices (String8) and manipulation utilities.
Core fixed-width type aliases and memory size constants.
#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 multiple of p (must be 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 str with the first amt bytes removed.
static String8 str8_substr(String8 str, usize first, usize one_past_last)
Returns the substring from byte index first to one_past_last.
static String8 str8_prefix(String8 str, usize size)
Returns the first size bytes of str.
#define STR8(s)
Wraps a C string literal into a String8 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.
Single-header testing framework with pretty-printed output.
#define EXPECT_STR8_EQ(a, b)
Asserts two String8 values are exactly equal.
#define EXPECT(cond)
Evaluates a condition. Records and counts the failure if false.
#define TEST_CASE(name)
Declares a test case function.