Testing

A minimal, macro-based Unit Test framework included in the kernel.

Methodology

Camelot uses a header-only test harness designed for Unity Builds. The tests/main.c file includes all test files directly, allowing the compiler to optimize the entire suite as a single translation unit.

Writing Tests

Tests are defined in tests/*.c and registered automatically by the runner logic.

#include "tests.h"

TEST(test_logic) {
    REQUIRE(1 == 1);
    // If false, prints file/line and increments failure count.
}

Last updated