[or-cvs] try to fix bug with spurious "everything is broken" warning

Nick Mathewson nickm at seul.org
Mon Feb 13 00:26:45 UTC 2006


Update of /home/or/cvsroot/tor/src/or
In directory moria:/tmp/cvs-serv7359/src/or

Modified Files:
	test.c 
Log Message:
try to fix bug with spurious "everything is broken" warning

Index: test.c
===================================================================
RCS file: /home/or/cvsroot/tor/src/or/test.c,v
retrieving revision 1.220
retrieving revision 1.221
diff -u -p -d -r1.220 -r1.221
--- test.c	12 Feb 2006 23:44:02 -0000	1.220
+++ test.c	13 Feb 2006 00:26:43 -0000	1.221
@@ -835,6 +835,11 @@ test_util(void)
   test_eq(u32, 0x7f000001u);
   test_eq(u16, 0);
   tor_free(cp);
+  test_eq(0, addr_mask_get_bits(0x0u));
+  test_eq(32, addr_mask_get_bits(0xFFFFFFFFu));
+  test_eq(16, addr_mask_get_bits(0xFFFF0000u));
+  test_eq(31, addr_mask_get_bits(0xFFFFFFFEu));
+  test_eq(1, addr_mask_get_bits(0x80000000u));
 
   /* Test tor_parse_long. */
   test_eq(10L, tor_parse_long("10",10,0,100,NULL,NULL));



More information about the tor-commits mailing list