summaryrefslogtreecommitdiff
path: root/examples/unit/test_framework.c
diff options
context:
space:
mode:
Diffstat (limited to 'examples/unit/test_framework.c')
-rw-r--r--examples/unit/test_framework.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/examples/unit/test_framework.c b/examples/unit/test_framework.c
new file mode 100644
index 0000000..22ededd
--- /dev/null
+++ b/examples/unit/test_framework.c
@@ -0,0 +1,13 @@
+#include <assert.h>
+
+void *test(void);
+
+void *inter_main(void) {
+ return test();
+}
+
+void *assert_equals(void *a, void *b, void *c) {
+ int ia = *((int *) a), ib = *((int *) b);
+ assert(ia == ib);
+ return c;
+}