aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2006-02-13 00:26:43 +0000
committerNick Mathewson <nickm@torproject.org>2006-02-13 00:26:43 +0000
commit2cc66125b8c90558d30f93456fb8d7c3bd1362ec (patch)
treea83c013110feb335435f8c2a963d440ed66258ef /src/or
parente20df524b9fdc2393e947eec723f3fc9b8474c2a (diff)
downloadtor-2cc66125b8c90558d30f93456fb8d7c3bd1362ec.tar.gz
tor-2cc66125b8c90558d30f93456fb8d7c3bd1362ec.zip
try to fix bug with spurious "everything is broken" warning
svn:r5994
Diffstat (limited to 'src/or')
-rw-r--r--src/or/test.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/or/test.c b/src/or/test.c
index 8f81eb2c05..c55ec5f4dc 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -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));