changeset 7519:4ba3de34eaa4 HEAD

net_is_in_network(): Added IPv6 unit tests
author Timo Sirainen <tss@iki.fi>
date Thu, 15 May 2008 08:31:20 +0300
parents 45a4fe590389
children 85203e817f90
files src/tests/test-lib.c
diffstat 1 files changed, 9 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/tests/test-lib.c	Thu May 15 07:53:11 2008 +0300
+++ b/src/tests/test-lib.c	Thu May 15 08:31:20 2008 +0300
@@ -388,7 +388,15 @@
 		{ "1.2.3.255", "1.2.3.254", 31, TRUE },
 		{ "1.2.3.255", "1.2.3.0", 24, TRUE },
 		{ "1.2.255.255", "1.2.254.0", 23, TRUE },
-		{ "255.255.255.255", "128.0.0.0", 1, TRUE }
+		{ "255.255.255.255", "128.0.0.0", 1, TRUE },
+		{ "255.255.255.255", "127.0.0.0", 1, FALSE }
+#ifdef HAVE_IPV6
+		,
+		{ "1234:5678::abcf", "1234:5678::abce", 127, TRUE },
+		{ "1234:5678::abcd", "1234:5678::abce", 127, FALSE },
+		{ "123e::ffff", "123e::0", 15, TRUE },
+		{ "123d::ffff", "123e::0", 15, FALSE }
+#endif
 	};
 	struct ip_addr ip, net_ip;
 	unsigned int i;