diff options
Diffstat (limited to 'test/source')
-rw-r--r-- | test/source/main.c | 8 | ||||
-rw-r--r-- | test/source/test/memcat.i | 43 | ||||
-rw-r--r-- | test/source/test/strcat.i | 19 |
3 files changed, 2 insertions, 68 deletions
diff --git a/test/source/main.c b/test/source/main.c index 0d5ea85..3e33c35 100644 --- a/test/source/main.c +++ b/test/source/main.c @@ -19,7 +19,6 @@ typedef bool (* zaptest_testtyp)(void); #include "test/bool.i" #include "test/cmp.i" -#include "test/memcat.i" #include "test/memcnt.i" #include "test/memcp.i" #include "test/memeq.i" @@ -28,7 +27,6 @@ typedef bool (* zaptest_testtyp)(void); #include "test/memfor.i" #include "test/memgen.i" #include "test/nullptr.i" -#include "test/strcat.i" #include "test/strcp.i" #include "test/streq.i" #include "test/strfill.i" @@ -43,7 +41,6 @@ typedef bool (* zaptest_testtyp)(void); static zaptest_testtyp zaptest_tests[] = { zaptest_test_bool, zaptest_test_cmp, - zaptest_test_memcat, zaptest_test_memcnt, zaptest_test_memcp, zaptest_test_memeq, @@ -52,7 +49,6 @@ static zaptest_testtyp zaptest_tests[] = { zaptest_test_memfor, zaptest_test_memgen, zaptest_test_nullptr, - zaptest_test_strcat, zaptest_test_strcp, zaptest_test_streq, zaptest_test_strfill, @@ -66,9 +62,10 @@ static zaptest_testtyp zaptest_tests[] = { }; static char const * zaptest_testnms[] = { + "abs", + "add", "bool", "cmp", - "memcat", "memcnt", "memcp", "memeq", @@ -77,7 +74,6 @@ static char const * zaptest_testnms[] = { "memfor", "memgen", "nullptr", - "strcat", "strcp", "streq", "strfill", diff --git a/test/source/test/memcat.i b/test/source/test/memcat.i deleted file mode 100644 index f16faef..0000000 --- a/test/source/test/memcat.i +++ /dev/null @@ -1,43 +0,0 @@ -#include <stdbool.h> - -static bool zaptest_test_memcat(void) { - unsigned short const arr0[] = { - 0x1u, - 0x3u, - 0x7u, - 0xFu, - 0x1Fu, - 0x3Fu, - 0x7Fu, - 0xFFu, - }; - unsigned short const arr1[] = { - 0x1FFu, - 0x3FFu, - 0x7FFu, - 0xFFFu, - 0x1FFFu, - 0x3FFFu, - 0x7FFFu, - 0xFFFFu, - }; - unsigned short buf[(sizeof (arr0) + sizeof (arr1)) / sizeof (arr0[0x0u])]; - zap_memcat(arr0,sizeof (arr0),arr1,sizeof (arr1),buf); - zaptest_chk(buf[0x0u],0x1u, unsigned int,"%X"); - zaptest_chk(buf[0x1u],0x3u, unsigned int,"%X"); - zaptest_chk(buf[0x2u],0x7u, unsigned int,"%X"); - zaptest_chk(buf[0x3u],0xFu, unsigned int,"%X"); - zaptest_chk(buf[0x4u],0x1F, unsigned int,"%X"); - zaptest_chk(buf[0x5u],0x3Fu, unsigned int,"%X"); - zaptest_chk(buf[0x6u],0x7Fu, unsigned int,"%X"); - zaptest_chk(buf[0x7u],0xFFu, unsigned int,"%X"); - zaptest_chk(buf[0x8u],0x1FFu, unsigned int,"%X"); - zaptest_chk(buf[0x9u],0x3FFu, unsigned int,"%X"); - zaptest_chk(buf[0xAu],0x7FFu, unsigned int,"%X"); - zaptest_chk(buf[0xBu],0xFFFu, unsigned int,"%X"); - zaptest_chk(buf[0xCu],0x1FFFu,unsigned int,"%X"); - zaptest_chk(buf[0xDu],0x3FFFu,unsigned int,"%X"); - zaptest_chk(buf[0xEu],0x7FFFu,unsigned int,"%X"); - zaptest_chk(buf[0xFu],0xFFFFu,unsigned int,"%X"); - return false; -} diff --git a/test/source/test/strcat.i b/test/source/test/strcat.i deleted file mode 100644 index e037b88..0000000 --- a/test/source/test/strcat.i +++ /dev/null @@ -1,19 +0,0 @@ -#include <stdbool.h> - -static bool zaptest_test_strcat(void) { - char const str0[] = "u r "; - char const str1[] = "mr gay"; - char buf[sizeof (str0) + sizeof (str1)]; - zap_strcat(str0,str1,buf); - zaptest_chk(buf[0x0u],'u',char,"'%c'"); - zaptest_chk(buf[0x1u],' ',char,"'%c'"); - zaptest_chk(buf[0x2u],'r',char,"'%c'"); - zaptest_chk(buf[0x3u],' ',char,"'%c'"); - zaptest_chk(buf[0x4u],'m',char,"'%c'"); - zaptest_chk(buf[0x5u],'r',char,"'%c'"); - zaptest_chk(buf[0x6u],' ',char,"'%c'"); - zaptest_chk(buf[0x7u],'g',char,"'%c'"); - zaptest_chk(buf[0x8u],'a',char,"'%c'"); - zaptest_chk(buf[0x9u],'y',char,"'%c'"); - return false; -} |