diff options
author | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-09-18 19:18:01 +0300 |
---|---|---|
committer | Anastasis Grammenos <anastasis.gramm2@gmail.com> | 2018-09-18 19:18:01 +0300 |
commit | 8702ce8bbd4d1435cc81fa8fcd7f5309d3c7b003 (patch) | |
tree | 8ce1b6f62ee2cd7d527f23928b20e7b2a1853388 /unit/ck-test.c | |
parent | af17ead850f90cf6e4476aa74975e68d7293fb27 (diff) | |
download | ck-8702ce8bbd4d1435cc81fa8fcd7f5309d3c7b003.tar.gz ck-8702ce8bbd4d1435cc81fa8fcd7f5309d3c7b003.tar.bz2 ck-8702ce8bbd4d1435cc81fa8fcd7f5309d3c7b003.zip |
VC and secret dir are now stored with absolute path
Diffstat (limited to 'unit/ck-test.c')
-rw-r--r-- | unit/ck-test.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/unit/ck-test.c b/unit/ck-test.c index 01156f1..9c18dfb 100644 --- a/unit/ck-test.c +++ b/unit/ck-test.c @@ -1,12 +1,25 @@ +#include <assert.h> +#include <stdio.h> +#include <string.h> + #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"); + cklist *ckl1 = list_make_new(); + cklist *ckl2 = list_make_and_add("first"); + list_add(ckl2, "second"); + list_add(ckl1, "first"); + list_add(ckl1, "second"); + assert(strcmp(list_get_at(ckl1, 0), + list_get_at(ckl2, 0)) == 0); + assert(strcmp(list_get_at(ckl1, 1), + list_get_at(ckl2, 1)) == 0); + list_free(ckl1); + list_free(ckl2); } void ck_list_add() { |