From 7cd3b7caee10d62f7be674afb86a136bf30485d6 Mon Sep 17 00:00:00 2001 From: Kacper Date: Mon, 15 Dec 2025 14:42:29 +0100 Subject: Add mqueue rt api, add header tests --- tests/headers/arpa_inet.c | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 tests/headers/arpa_inet.c (limited to 'tests/headers/arpa_inet.c') diff --git a/tests/headers/arpa_inet.c b/tests/headers/arpa_inet.c new file mode 100644 index 00000000..b5a5c33a --- /dev/null +++ b/tests/headers/arpa_inet.c @@ -0,0 +1,30 @@ +// https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/arpa_inet.h.html + +#include "core.h" + +#include + +TEST(arpa_inet_h) +{ + TYPE(in_port_t); + TYPE(in_addr_t); + + TYPE(struct in_addr); + + MACRO(INET_ADDRSTRLEN); + MACRO(INET6_ADDRSTRLEN); + + FUNCTION(htonl, FN(uint32_t, uint32_t)) + FUNCTION(htons, FN(uint16_t, uint16_t)) + FUNCTION(ntohl, FN(uint32_t, uint32_t)) + FUNCTION(ntohs, FN(uint16_t, uint16_t)) + + TYPE(uint32_t); + TYPE(uint16_t); + + FUNCTION(inet_addr, FN(in_addr_t, const char *)) + FUNCTION(inet_ntoa, FN(char *, struct in_addr)) + FUNCTION(inet_ntop, FN(const char *, int, const void *restrict, + char *restrict, socklen_t)); + FUNCTION(inet_pton, FN(int, int, const char *restrict, void *restrict)) +} -- cgit v1.2.3