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/test_misc.c | 30 ------------------------------ 1 file changed, 30 deletions(-) delete mode 100644 test/src/test_misc.c (limited to 'test/src/test_misc.c') diff --git a/test/src/test_misc.c b/test/src/test_misc.c deleted file mode 100644 index f103455..0000000 --- a/test/src/test_misc.c +++ /dev/null @@ -1,30 +0,0 @@ -#include -#include -#include - -void gen_macs() { - printf("Getting 10 random MAC addresses:\n"); - for(int i = 0; i < 10; i++) { - unsigned char mac[6] = {0}; - libwifi_random_mac(mac, NULL); - printf(MACSTR "\n", MAC2STR(mac)); - } - - printf("Generating 10 random MAC addresses with 00:20:91 OUI:\n"); - for(int i = 0; i < 10; i++) { - unsigned char mac[6] = {0}; - libwifi_random_mac(mac, (unsigned char *) "\x00\x20\x91"); - printf(MACSTR "\n", MAC2STR(mac)); - } - printf("\n"); -} - -int main() { - libwifi_dummy(); - - printf("libwifi version: %s\n\n", libwifi_get_version()); - - gen_macs(); - - return 0; -} -- cgit 1.4.1