summaryrefslogtreecommitdiff
path: root/test/tap.h
diff options
context:
space:
mode:
authorPhil Jones <philj56@gmail.com>2022-10-18 19:33:47 +0100
committerPhil Jones <philj56@gmail.com>2022-10-18 19:53:06 +0100
commit340692299ed834f962b83b1bc0eb6f49471ca556 (patch)
treef0a1c9160397b22a662e6399e085336de3396a73 /test/tap.h
parent5482f0be746a98bdd6b2c54183b54dd2ff2a0192 (diff)
Add beginnings of test framework.
Just contains a couple of very simple UTF-8 tests for now.
Diffstat (limited to 'test/tap.h')
-rw-r--r--test/tap.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/test/tap.h b/test/tap.h
new file mode 100644
index 0000000..fc0df61
--- /dev/null
+++ b/test/tap.h
@@ -0,0 +1,15 @@
+#ifndef TAP_H
+#define TAP_H
+
+#include <stddef.h>
+
+#define tap_is(a, b, message) ((a) == (b) ? tap_ok((message)) : tap_not_ok((message)))
+#define tap_isnt(a, b, message) ((a) != (b) ? tap_ok((message)) : tap_not_ok((message)))
+
+void tap_version(size_t version);
+void tap_plan(void);
+void tap_ok(const char *message, ...);
+void tap_not_ok(const char *message, ...);
+void tap_todo(const char *message);
+
+#endif /* TAP_H */