aboutsummaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rw-r--r--README.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/README.md b/README.md
index d9e7d61..0fffdc3 100644
--- a/README.md
+++ b/README.md
@@ -30,6 +30,13 @@ the following example file is available as [example.c](doc/example.c), which
you can compile and play with yourself.
```C
+/* 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 */
@@ -173,6 +180,8 @@ simple-test's interface consists of a series of preprocessor macros:
| **NAME** | **DESCRIPTION** |
|---------:|:----------------|
+| **SIMPLE_TEST_USE_COLOUR** | may be defined, before the header is included, as either a `true` or `false` resolving expression. default is `true` |
+| **SIMPLE_TEST_PRINT_FUN** | may be defined, before the header is included, as a function or macro which takes `printf` style arguments. default is `printf` |
| **BEGIN_TEST** | must be included once, after includes and global declarations and before the first `TEST` statement |
| **END_TEST** | must be included once, after the final `TEST` statement |
| **TEST(description)**{} | declare a test, described by `description`, which consists of statements between the {} |