From bb912b081ed339e4a5419bd3d2ffd7465f2f72d3 Mon Sep 17 00:00:00 2001 From: nodist Date: Mon, 27 Jul 2026 17:17:56 -0400 Subject: bottom up redesign --- docs/application/testing.md | 52 --------------------------------------------- 1 file changed, 52 deletions(-) delete mode 100644 docs/application/testing.md (limited to 'docs/application/testing.md') diff --git a/docs/application/testing.md b/docs/application/testing.md deleted file mode 100644 index 710915c..0000000 --- a/docs/application/testing.md +++ /dev/null @@ -1,52 +0,0 @@ -# Testing - ---- - -## Macros - -```c -TEST(NAME) { - // TEST BODY -} - -ASSERT(CONDITION, FAIL_STRING) - -FAIL(FAIL_STRING) -``` - -## Object Definitions - -```c -typedef struct { - const char *name; - kpl_error *error; -} kpl_test; - -// TODO STORE ERRORS FOR PRINT AT END - -#define _TEST_FN(NAME) static void kpl_test_fn_##NAME(__attribute__(unused)) kpl_test *_test) - -#define TEST(NAME) \ - _TEST_FN(NAME); \ - static void __attribute__((constructor)) _kpl_test_constructor_##NAME(void) { \ - kpl_test _test = { .name = #NAME; .error = NULL }; \ - kpl_test_fn_##NAME(&test); \ - if (_test.error) { \ - /* TODO STORE ERROR */ \ - } \ - /* TODO PRINT STATUS */ \ - } \ - _TEST_FN(NAME) - -// TODO ASSERT - -// TODO FAIL -``` - -## `make test` - -Bundle all tests into a single executable - -## `TEST_FILES="$NAMES..." make test` - -Only build specified file(s) -- cgit v1.2.3