aboutsummaryrefslogtreecommitdiff
path: root/lib/cmark/api_test/harness.h
diff options
context:
space:
mode:
authorFelix (xq) Queißner <git@mq32.de>2020-06-09 18:27:38 +0200
committerFelix (xq) Queißner <git@mq32.de>2020-06-09 18:27:38 +0200
commitde8fd9328e9deb0d1ec596d7486686ea3cb688c2 (patch)
tree9c25d7568dee522c1d2ed7b6d238d1dad54163f6 /lib/cmark/api_test/harness.h
parent661ddc244793102ee0720871c4edcd64f80bc744 (diff)
downloadkristall-de8fd9328e9deb0d1ec596d7486686ea3cb688c2.tar.gz
Includes cmark markdown parser library.
Diffstat (limited to 'lib/cmark/api_test/harness.h')
-rw-r--r--lib/cmark/api_test/harness.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/cmark/api_test/harness.h b/lib/cmark/api_test/harness.h
new file mode 100644
index 0000000..53b9889
--- /dev/null
+++ b/lib/cmark/api_test/harness.h
@@ -0,0 +1,35 @@
+#ifndef CMARK_API_TEST_HARNESS_H
+#define CMARK_API_TEST_HARNESS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct {
+ int test_num;
+ int num_passed;
+ int num_failed;
+ int num_skipped;
+} test_batch_runner;
+
+test_batch_runner *test_batch_runner_new();
+
+void SKIP(test_batch_runner *runner, int num_tests);
+
+void OK(test_batch_runner *runner, int cond, const char *msg, ...);
+
+void INT_EQ(test_batch_runner *runner, int got, int expected, const char *msg,
+ ...);
+
+void STR_EQ(test_batch_runner *runner, const char *got, const char *expected,
+ const char *msg, ...);
+
+int test_ok(test_batch_runner *runner);
+
+void test_print_summary(test_batch_runner *runner);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif