diff options
author | EuAndreh <eu@euandre.org> | 2021-07-31 15:49:16 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2021-07-31 15:50:44 -0300 |
commit | d843a40a039936b4d9b2b7b7552b88e9944bdd95 (patch) | |
tree | 92ddabf3315346c22aeceef26c6a1ec4a9584513 /src/unit-test.c | |
parent | src/gistatic.c: Add basic support for i18n with catgets; write initial -h hel... (diff) | |
download | gistatic-d843a40a039936b4d9b2b7b7552b88e9944bdd95.tar.gz gistatic-d843a40a039936b4d9b2b7b7552b88e9944bdd95.tar.xz |
src/: Embed unit-test.c into gistatic.c
Diffstat (limited to 'src/unit-test.c')
-rw-r--r-- | src/unit-test.c | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/src/unit-test.c b/src/unit-test.c deleted file mode 100644 index 2e942a0..0000000 --- a/src/unit-test.c +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef UNIT_TEST_H -#define UNIT_TEST_H - -#include "unit-test.h" -#include <stdio.h> -#include <assert.h> - -#define COLOUR_RESET "\033[0m" -#define COLOUR_RED "\033[0;31m" -#define COLOUR_GREEN "\033[0;32m" -#define COLOUR_YELLOW "\033[0;33m" - -void test_start(const char *const name) { - assert(fprintf(stderr, "%s():\n", name) > 0); -} - -void testing(const char *const message) { - assert( - fprintf( - stderr, - COLOUR_YELLOW "testing" COLOUR_RESET ": %s...", - message - ) > 0 - ); -} - -void test_ok() { - assert(fprintf(stderr, " " COLOUR_GREEN "OK" COLOUR_RESET ".\n") > 0); -} - -#endif |