From cd1df65dc36ac35d526de195284d5ebf18e1f92b Mon Sep 17 00:00:00 2001 From: Marc Date: Fri, 17 Dec 2021 18:52:36 +0000 Subject: test: Add ctests for generation functions. This commit also enforces error code checking on functions inside of the generation functions, such as for `libwifi_quick_add_tag`. --- test/src/helpers.c | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 test/src/helpers.c (limited to 'test/src/helpers.c') diff --git a/test/src/helpers.c b/test/src/helpers.c deleted file mode 100644 index 9fc9d0b..0000000 --- a/test/src/helpers.c +++ /dev/null @@ -1,31 +0,0 @@ -#include "helpers.h" -#include - -void hexdump(void *data, size_t size) { - char ascii[17]; - size_t i, j; - ascii[16] = '\0'; - for (i = 0; i < size; ++i) { - printf("%02X ", ((unsigned char *) data)[i]); - if (((unsigned char *) data)[i] >= ' ' && ((unsigned char *) data)[i] <= '~') { - ascii[i % 16] = ((unsigned char *) data)[i]; - } else { - ascii[i % 16] = '.'; - } - if ((i + 1) % 8 == 0 || i + 1 == size) { - printf(" "); - if ((i + 1) % 16 == 0) { - printf("| %s \n", ascii); - } else if (i + 1 == size) { - ascii[(i + 1) % 16] = '\0'; - if ((i + 1) % 16 <= 8) { - printf(" "); - } - for (j = (i + 1) % 16; j < 16; ++j) { - printf(" "); - } - printf("| %s \n", ascii); - } - } - } -} -- cgit 1.4.1