aboutsummaryrefslogtreecommitdiffstats
path: root/doc/example.c
diff options
context:
space:
mode:
authorkatherine <ageha@airen-no-jikken.icu>2019-06-14 18:48:19 -0700
committerkatherine <ageha@airen-no-jikken.icu>2019-06-14 18:48:19 -0700
commitcae280b3246a51cd485cb01c8ec73a205ceac7e8 (patch)
tree9d7be5298e0b1dcbcec041d45173496df7eec4c9 /doc/example.c
parent1cc20f0b45a5dd053e344ba9b925eff721f21893 (diff)
downloadsimple-test-cae280b3246a51cd485cb01c8ec73a205ceac7e8.tar.gz
add macro settings for colour and print fun
Diffstat (limited to 'doc/example.c')
-rw-r--r--doc/example.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/example.c b/doc/example.c
index 6341a1f..0229d2a 100644
--- a/doc/example.c
+++ b/doc/example.c
@@ -1,3 +1,10 @@
+/* SIMPLE_TEST_PRINT_FUN may be redefined like so. default is `printf` */
+#define stderr_redirect(...) fprintf(stderr, __VA_ARGS__)
+#define SIMPLE_TEST_PRINT_FUN stderr_redirect
+
+/* colour output is on by default, but can be disabled */
+/* #define SIMPLE_TEST_USE_COLOUR false */
+
#include "../simple-test.h"
/* global variables, functions, and includes must come before BEGIN_TEST */