1 /* $Id: inet_ntoa-t.c 5061 2001-12-12 09:21:17Z rra $ */
2 /* inet_ntoa test suite. */
6 #include <netinet/in.h>
10 const char *test_inet_ntoa(const struct in_addr);
13 test_addr(int n, const char *expected, unsigned long addr)
17 in.s_addr = htonl(addr);
18 ok_string(n, expected, test_inet_ntoa(in));
26 test_addr(1, "0.0.0.0", 0x0);
27 test_addr(2, "127.0.0.0", 0x7f000000UL);
28 test_addr(3, "255.255.255.255", 0xffffffffUL);
29 test_addr(4, "172.200.232.199", 0xacc8e8c7UL);
30 test_addr(5, "1.2.3.4", 0x01020304UL);