Fixes to tests.

This commit is contained in:
Jan Vidar Krey 2009-07-26 06:27:16 +02:00
parent 945c6be14c
commit 112fa2f845
1 changed files with 2 additions and 2 deletions

View File

@ -606,13 +606,13 @@ EXO_TEST(ip_range_2, {
EXO_TEST(ip_range_3, { EXO_TEST(ip_range_3, {
struct ip_range range; memset(&range, 0, sizeof(range)); struct ip_range range; memset(&range, 0, sizeof(range));
return ip_convert_address_to_range("192.168.0.0/24", &range) && range.lo.af == range.hi.af && memcmp(&range.lo, &range.hi, sizeof(struct ip_addr_encap)) != 0; return ip_convert_address_to_range("192.168.0.0/16", &range) && range.lo.af == range.hi.af && memcmp(&range.lo, &range.hi, sizeof(struct ip_addr_encap)) != 0;
}); });
EXO_TEST(ip_range_4, { EXO_TEST(ip_range_4, {
struct ip_range range1; memset(&range1, 0, sizeof(range1)); struct ip_range range1; memset(&range1, 0, sizeof(range1));
struct ip_range range2; memset(&range2, 0, sizeof(range2)); struct ip_range range2; memset(&range2, 0, sizeof(range2));
return ip_convert_address_to_range("192.168.0.0/24", &range1) && ip_convert_address_to_range("192.168.0.0-192.168.255.255", &range2) && memcmp(&range1, &range2, sizeof(struct ip_range)) == 0; return ip_convert_address_to_range("192.168.0.0/16", &range1) && ip_convert_address_to_range("192.168.0.0-192.168.255.255", &range2) && memcmp(&range1, &range2, sizeof(struct ip_range)) == 0;
}); });