From a83aee989b06729078e6ba7c8448b30a3bab4e1d Mon Sep 17 00:00:00 2001 From: Jonas Gunz Date: Sat, 4 Apr 2020 02:25:21 +0200 Subject: Moved server to server.h/.c, added tests - All server functions have been moved to server.h/.c - main call run_dns_server() or run_test() depending on makefile target - Makefile target test is now available - test.h/.c provide unit tests --- src/test.h | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/test.h (limited to 'src/test.h') diff --git a/src/test.h b/src/test.h new file mode 100644 index 0000000..885e304 --- /dev/null +++ b/src/test.h @@ -0,0 +1,29 @@ +/* test.h + * (c) Jonas Gunz, 2020 + * License: MIT + * */ + +#pragma once + +#include +#include "tree.h" +#include "dns.h" + +/* + * TODO + * * fuzz dns_parse_packet() + * * test dns_parse_packet() with random valid data + * * test qname_check() with random valid data + */ + +#ifdef _TEST + +void run_test (); + +int test_tree (); + +int test_dns_parsing (); + +int test_dns_parsing_fuzz(); + +#endif -- cgit v1.2.3