aboutsummaryrefslogtreecommitdiffstats
path: root/unit/ck-test.c
diff options
context:
space:
mode:
authorAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-09-16 15:27:31 +0300
committerAnastasis Grammenos <anastasis.gramm2@gmail.com>2018-09-16 15:27:31 +0300
commitaf17ead850f90cf6e4476aa74975e68d7293fb27 (patch)
tree8e2db1f5feae9b25cf5294ea635378f444d295c7 /unit/ck-test.c
parent0f33c8a9cbabda257c4dd73009266a4cf5f857a7 (diff)
downloadck-af17ead850f90cf6e4476aa74975e68d7293fb27.tar.gz
ck-af17ead850f90cf6e4476aa74975e68d7293fb27.tar.bz2
ck-af17ead850f90cf6e4476aa74975e68d7293fb27.zip
Add unit test infrastructure
Diffstat (limited to 'unit/ck-test.c')
-rw-r--r--unit/ck-test.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/unit/ck-test.c b/unit/ck-test.c
new file mode 100644
index 0000000..01156f1
--- /dev/null
+++ b/unit/ck-test.c
@@ -0,0 +1,24 @@
+#include "cklist.h"
+#include "stdio.h"
+
+#define CK_UNIT_TESTS \
+ X(ck_list_init, "Initialize ck list") \
+ X(ck_list_add, "Add elements to ck list")
+
+void ck_list_init() {
+ printf("Test1\n");
+}
+
+void ck_list_add() {
+ printf("Test2\n");
+}
+
+int main() {
+#define X(TEST, DESC) \
+ printf("--[%s]--\n", DESC); \
+ TEST(); \
+ printf("--[Passed]--\n\n");
+ CK_UNIT_TESTS
+#undef X
+}
+