test/unitest.h file

Classes

struct test_node
struct benchmark_node

Functions

static auto run_tests(void) -> int
Function to run all registered tests.
static auto run_benchmarks(void) -> double
Function to run all registered benchmarks.

Variables

const double EPSILON
struct test_node* test_head
struct benchmark_node* benchmark_head

Defines

#define PRINT_TEST_PASS(name, tags)
#define PRINT_TEST_FAIL(name, tags)
#define CONCAT_(x, y)
#define CONCAT(x, y)
#define INITIALIZER(f)
#define TEST_CASE(name, tags)
#define BENCHMARK(name, tags)
#define REQUIRE(cond)
#define FAIL(fmt, ...)

Function documentation

static int run_tests(void)

Function to run all registered tests.

Returns Returns the number of failures (0 for success)

static double run_benchmarks(void)

Function to run all registered benchmarks.

Returns Returns the total seconds of all benchmarks summed up