about summary refs log tree commit diff stats
path: root/test/src/test_misc.c
diff options
context:
space:
mode:
authorMarc <foxtrot@malloc.me>2021-12-17 18:52:36 +0000
committerMarc <foxtrot@malloc.me>2021-12-17 19:31:25 +0000
commitcd1df65dc36ac35d526de195284d5ebf18e1f92b (patch)
treefc0c163cd9f86d452fec1eb90d48a22d67cf4256 /test/src/test_misc.c
parent8e09d29df19312583747a3de00fe4269c17e6586 (diff)
downloadlibwifi-cd1df65dc36ac35d526de195284d5ebf18e1f92b.tar.gz
libwifi-cd1df65dc36ac35d526de195284d5ebf18e1f92b.tar.bz2
libwifi-cd1df65dc36ac35d526de195284d5ebf18e1f92b.zip
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`.
Diffstat (limited to 'test/src/test_misc.c')
-rw-r--r--test/src/test_misc.c30
1 files changed, 0 insertions, 30 deletions
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 @@
1#include <libwifi.h>
2#include <libwifi/core/core.h>
3#include <stdio.h>
4
5void gen_macs() {
6 printf("Getting 10 random MAC addresses:\n");
7 for(int i = 0; i < 10; i++) {
8 unsigned char mac[6] = {0};
9 libwifi_random_mac(mac, NULL);
10 printf(MACSTR "\n", MAC2STR(mac));
11 }
12
13 printf("Generating 10 random MAC addresses with 00:20:91 OUI:\n");
14 for(int i = 0; i < 10; i++) {
15 unsigned char mac[6] = {0};
16 libwifi_random_mac(mac, (unsigned char *) "\x00\x20\x91");
17 printf(MACSTR "\n", MAC2STR(mac));
18 }
19 printf("\n");
20}
21
22int main() {
23 libwifi_dummy();
24
25 printf("libwifi version: %s\n\n", libwifi_get_version());
26
27 gen_macs();
28
29 return 0;
30}