diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/source/main.c (renamed from test/src/main.c) | 3 | ||||
-rw-r--r-- | test/source/test/bool.i (renamed from test/src/test/bool.i) | 0 | ||||
-rw-r--r-- | test/source/test/cmp.i (renamed from test/src/test/cmp.i) | 0 | ||||
-rw-r--r-- | test/source/test/fndbyte.i (renamed from test/src/test/fndbyte.i) | 0 | ||||
-rw-r--r-- | test/source/test/fndchr.i (renamed from test/src/test/fndchr.i) | 0 | ||||
-rw-r--r-- | test/source/test/foreach.i (renamed from test/src/test/foreach.i) | 0 | ||||
-rw-r--r-- | test/source/test/memcat.i (renamed from test/src/test/memcat.i) | 0 | ||||
-rw-r--r-- | test/source/test/memcp.i (renamed from test/src/test/memcp.i) | 0 | ||||
-rw-r--r-- | test/source/test/memeq.i (renamed from test/src/test/memeq.i) | 0 | ||||
-rw-r--r-- | test/source/test/memfill.i (renamed from test/src/test/memfill.i) | 0 | ||||
-rw-r--r-- | test/source/test/memgen.i (renamed from test/src/test/memgen.i) | 0 | ||||
-rw-r--r-- | test/source/test/nullptr.i (renamed from test/src/test/nullptr.i) | 0 | ||||
-rw-r--r-- | test/source/test/strcat.i (renamed from test/src/test/strcat.i) | 0 | ||||
-rw-r--r-- | test/source/test/strcp.i (renamed from test/src/test/strcp.i) | 0 | ||||
-rw-r--r-- | test/source/test/streq.i (renamed from test/src/test/streq.i) | 4 | ||||
-rw-r--r-- | test/source/test/strfill.i (renamed from test/src/test/strfill.i) | 0 | ||||
-rw-r--r-- | test/source/test/strlen.i (renamed from test/src/test/strlen.i) | 0 | ||||
-rw-r--r-- | test/source/test/utf8dec.i (renamed from test/src/test/utf8dec.i) | 0 | ||||
-rw-r--r-- | test/source/test/utf8enc.i (renamed from test/src/test/utf8enc.i) | 0 | ||||
-rw-r--r-- | test/source/test/win1252dec.i (renamed from test/src/test/win1252dec.i) | 0 | ||||
-rw-r--r-- | test/source/test/win1252enc.i (renamed from test/src/test/win1252enc.i) | 0 | ||||
-rw-r--r-- | test/src/test/memcmp.i | 26 |
22 files changed, 4 insertions, 29 deletions
diff --git a/test/src/main.c b/test/source/main.c index 79bf0ce..38c9f68 100644 --- a/test/src/main.c +++ b/test/source/main.c @@ -23,7 +23,6 @@ typedef bool (* zaptest_testtyp)(void); #include "test/fndchr.i" #include "test/foreach.i" #include "test/memcat.i" -#include "test/memcmp.i" #include "test/memcp.i" #include "test/memeq.i" #include "test/memfill.i" @@ -46,7 +45,6 @@ static zaptest_testtyp zaptest_tests[] = { zaptest_test_fndchr, zaptest_test_foreach, zaptest_test_memcat, - zaptest_test_memcmp, zaptest_test_memcp, zaptest_test_memeq, zaptest_test_memfill, @@ -70,7 +68,6 @@ static char const * zaptest_testnms[] = { "fndchr", "foreach", "memcat", - "memcmp", "memcp", "memeq", "memfill", diff --git a/test/src/test/bool.i b/test/source/test/bool.i index adacf85..adacf85 100644 --- a/test/src/test/bool.i +++ b/test/source/test/bool.i diff --git a/test/src/test/cmp.i b/test/source/test/cmp.i index fbb7d5c..fbb7d5c 100644 --- a/test/src/test/cmp.i +++ b/test/source/test/cmp.i diff --git a/test/src/test/fndbyte.i b/test/source/test/fndbyte.i index 56231ac..56231ac 100644 --- a/test/src/test/fndbyte.i +++ b/test/source/test/fndbyte.i diff --git a/test/src/test/fndchr.i b/test/source/test/fndchr.i index 8fb670a..8fb670a 100644 --- a/test/src/test/fndchr.i +++ b/test/source/test/fndchr.i diff --git a/test/src/test/foreach.i b/test/source/test/foreach.i index e7b933d..e7b933d 100644 --- a/test/src/test/foreach.i +++ b/test/source/test/foreach.i diff --git a/test/src/test/memcat.i b/test/source/test/memcat.i index f16faef..f16faef 100644 --- a/test/src/test/memcat.i +++ b/test/source/test/memcat.i diff --git a/test/src/test/memcp.i b/test/source/test/memcp.i index 4cfc17c..4cfc17c 100644 --- a/test/src/test/memcp.i +++ b/test/source/test/memcp.i diff --git a/test/src/test/memeq.i b/test/source/test/memeq.i index d9de72f..d9de72f 100644 --- a/test/src/test/memeq.i +++ b/test/source/test/memeq.i diff --git a/test/src/test/memfill.i b/test/source/test/memfill.i index 9cb4d6e..9cb4d6e 100644 --- a/test/src/test/memfill.i +++ b/test/source/test/memfill.i diff --git a/test/src/test/memgen.i b/test/source/test/memgen.i index dcc7c69..dcc7c69 100644 --- a/test/src/test/memgen.i +++ b/test/source/test/memgen.i diff --git a/test/src/test/nullptr.i b/test/source/test/nullptr.i index 00b49bd..00b49bd 100644 --- a/test/src/test/nullptr.i +++ b/test/source/test/nullptr.i diff --git a/test/src/test/strcat.i b/test/source/test/strcat.i index e037b88..e037b88 100644 --- a/test/src/test/strcat.i +++ b/test/source/test/strcat.i diff --git a/test/src/test/strcp.i b/test/source/test/strcp.i index cd878c9..cd878c9 100644 --- a/test/src/test/strcp.i +++ b/test/source/test/strcp.i diff --git a/test/src/test/streq.i b/test/source/test/streq.i index f9f1d31..62ed186 100644 --- a/test/src/test/streq.i +++ b/test/source/test/streq.i @@ -4,14 +4,18 @@ static bool zaptest_test_streq(void) { char const str0[] = "What's up, my guy?"; char const str1[] = "What's up, my guy?"; char const str2[] = "I don't know you!"; + char const str3[] = "I don't know you! Or do I?"; zaptest_log(str0,char const *,"%s") zaptest_log(str1,char const *,"%s") zaptest_log(str2,char const *,"%s") + zaptest_log(str3,char const *,"%s") zap_bool eq0 = zap_streq(str0,str1); zap_bool eq1 = zap_streq(str0,str2); zap_bool eq2 = zap_streq(str1,str2); + zap_bool eq3 = zap_streq(str2,str3); zaptest_chk(eq0,zap_true, unsigned char,"%hhX"); zaptest_chk(eq1,zap_false,unsigned char,"%hhX"); zaptest_chk(eq2,zap_false,unsigned char,"%hhX"); + zaptest_chk(eq3,zap_false,unsigned char,"%hhX"); return false; } diff --git a/test/src/test/strfill.i b/test/source/test/strfill.i index 1e2764c..1e2764c 100644 --- a/test/src/test/strfill.i +++ b/test/source/test/strfill.i diff --git a/test/src/test/strlen.i b/test/source/test/strlen.i index 93bec76..93bec76 100644 --- a/test/src/test/strlen.i +++ b/test/source/test/strlen.i diff --git a/test/src/test/utf8dec.i b/test/source/test/utf8dec.i index fdea169..fdea169 100644 --- a/test/src/test/utf8dec.i +++ b/test/source/test/utf8dec.i diff --git a/test/src/test/utf8enc.i b/test/source/test/utf8enc.i index 8bc7abb..8bc7abb 100644 --- a/test/src/test/utf8enc.i +++ b/test/source/test/utf8enc.i diff --git a/test/src/test/win1252dec.i b/test/source/test/win1252dec.i index 23fbe2b..23fbe2b 100644 --- a/test/src/test/win1252dec.i +++ b/test/source/test/win1252dec.i diff --git a/test/src/test/win1252enc.i b/test/source/test/win1252enc.i index 2bfa211..2bfa211 100644 --- a/test/src/test/win1252enc.i +++ b/test/source/test/win1252enc.i diff --git a/test/src/test/memcmp.i b/test/src/test/memcmp.i deleted file mode 100644 index d54a062..0000000 --- a/test/src/test/memcmp.i +++ /dev/null @@ -1,26 +0,0 @@ -#include <stdbool.h> - -static bool zaptest_test_memcmp(void) { - unsigned char const arr0[] = { - 0x7Fu, - 0x3Fu, - 0xFFu, - }; - unsigned char const arr1[] = { - 0x7Fu, - 0x3Fu, - 0x1Fu, - }; - unsigned char const arr2[] = { - 0x7Fu, - 0x3Fu, - 0xFFu, - }; - zap_cmp cmp = zap_memcmp(arr0,sizeof (arr0),arr1); - zaptest_chk(cmp,zap_gt,signed char,"%hhi") - cmp = zap_memcmp(arr1,sizeof (arr1),arr0); - zaptest_chk(cmp,zap_lt,signed char,"%hhi") - cmp = zap_memcmp(arr0,sizeof (arr0),arr2); - zaptest_chk(cmp,zap_eq,signed char,"%hhi") - return false; -} |