summaryrefslogtreecommitdiff
path: root/docs/application/testing.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/application/testing.md')
-rw-r--r--docs/application/testing.md52
1 files changed, 0 insertions, 52 deletions
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)