summaryrefslogtreecommitdiff
path: root/tests/helpers.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/helpers.c')
-rw-r--r--tests/helpers.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/helpers.c b/tests/helpers.c
new file mode 100644
index 0000000..42a0724
--- /dev/null
+++ b/tests/helpers.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+
+#include "lily-test.h"
+#include "tests.h"
+
+void run_test(const char *name, const char* (*test)())
+{
+ printf("%s... ", name);
+ const char *result = test();
+ if (result != 0) {
+ printf("FAILED (%s)\n", result);
+ }
+ else
+ printf("OK\n");
+}