diff options
author | EuAndreh <eu@euandre.org> | 2021-08-21 05:46:01 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-08-21 05:49:01 -0300 |
commit | 8cdf1afb795cf4f2d6eb01fa6a533d9321adec59 (patch) | |
tree | 22d8eb5f33eed5b7bfe513430002d679bf8460ec /src/tar.c | |
parent | TODOs.md: Add #task-a0634ded-968e-bce5-3fef-8e1c5e3aab35 (diff) | |
download | gistatic-8cdf1afb795cf4f2d6eb01fa6a533d9321adec59.tar.gz gistatic-8cdf1afb795cf4f2d6eb01fa6a533d9321adec59.tar.xz |
src/tests-lib.c: Move testing helper function and share it with other files
Diffstat (limited to 'src/tar.c')
-rw-r--r-- | src/tar.c | 24 |
1 files changed, 20 insertions, 4 deletions
@@ -1,18 +1,34 @@ #include "config.h" #include "tar.h" + #ifdef TEST + +#include "tests-lib.h" + +#include <stdbool.h> #include <stdlib.h> -#endif +#include <assert.h> -#ifdef TEST -static void unit_tests(void) { -} #endif + void a(void) { } #ifdef TEST +static void test_a(void) { + test_start("test_a:"); + { + testing("a"); + assert(true); + test_ok(); + } +} + +static void unit_tests(void) { + test_a(); +} + int main(void) { unit_tests(); return EXIT_SUCCESS; |