From af5e7495f3993c52573432cadde12169d5c05e62 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Wed, 15 Nov 2023 10:50:30 -0300 Subject: Add support for multi-file C project - have dynamic discovered dependencies via `mkdeps.hs`, and also move the listing of JavaScript files to it. - copy over stub C files for setting up the project skeleton. --- tests/tests-lib.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 tests/tests-lib.c (limited to 'tests/tests-lib.c') diff --git a/tests/tests-lib.c b/tests/tests-lib.c new file mode 100644 index 0000000..e46fb2d --- /dev/null +++ b/tests/tests-lib.c @@ -0,0 +1,28 @@ +#include "tests-lib.h" +#include +#include + +#define COLOUR_RESET "\033[0m" +#define COLOUR_GREEN "\033[0;32m" +#define COLOUR_YELLOW "\033[0;33m" + +void +test_start(const char *const name) { + assert(fprintf(stdout, "%s:\n", name) > 0); +} + +void +testing(const char *const message) { + assert( + fprintf( + stdout, + COLOUR_YELLOW "testing" COLOUR_RESET ": %s...", + message + ) > 0 + ); +} + +void +test_ok(void) { + assert(fprintf(stdout, " " COLOUR_GREEN "OK" COLOUR_RESET ".\n") > 0); +} -- cgit v1.2.3