Split out tests a bit, made a stronger API for running the full test suite

This commit is contained in:
2026-02-04 20:44:04 +00:00
parent 0681bb4314
commit ea2f745f1e
7 changed files with 365 additions and 250 deletions

View File

@@ -32,6 +32,24 @@
} \
} while (0)
typedef struct TestFn
{
const char *name;
void (*fn)(void);
} test_fn;
#define MAKE_TEST_FN(NAME) {.name = #NAME, .fn = NAME}
typedef struct
{
const char *name;
const test_fn *tests;
const u64 size;
} test_suite_t;
#define MAKE_TEST_SUITE(NAME) \
{.name = #NAME, .tests = NAME, .size = ARRSIZE(NAME)}
#endif
/* Copyright (C) 2026 Aryadev Chavali