diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-08-24 15:49:59 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-08-24 15:49:59 -0400 |
commit | 047790a25343e3857fb95e8874755440da30a982 (patch) | |
tree | 30f7f00f78aab3f4120eebabc6c9166e101e8f8c /src/test/test_address.c | |
parent | 0b36208fd88e284592bb78d5b7c41226d6576e00 (diff) | |
download | tor-047790a25343e3857fb95e8874755440da30a982.tar.gz tor-047790a25343e3857fb95e8874755440da30a982.zip |
apply ahf's test_assert_int.cocci
Diffstat (limited to 'src/test/test_address.c')
-rw-r--r-- | src/test/test_address.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c index 6dd65942be..a2a89c9a1d 100644 --- a/src/test/test_address.c +++ b/src/test/test_address.c @@ -224,7 +224,7 @@ test_address_ifaddrs_to_smartlist(void *arg) smartlist = ifaddrs_to_smartlist(ifa, AF_UNSPEC); tt_assert(smartlist); - tt_assert(smartlist_len(smartlist) == 3); + tt_int_op(smartlist_len(smartlist), OP_EQ, 3); sockaddr_to_check = tor_malloc(sizeof(struct sockaddr_in6)); @@ -384,7 +384,7 @@ test_address_ip_adapter_addresses_to_smartlist(void *arg) result = ip_adapter_addresses_to_smartlist(addrs1); tt_assert(result); - tt_assert(smartlist_len(result) == 3); + tt_int_op(smartlist_len(result), OP_EQ, 3); tor_addr = smartlist_get(result,0); @@ -730,7 +730,7 @@ test_address_udp_socket_trick_blackbox(void *arg) retval = get_interface_address6_via_udp_socket_hack(LOG_DEBUG, AF_INET+AF_INET6,&addr4); - tt_assert(retval == -1); + tt_int_op(retval, OP_EQ, -1); done: return; @@ -935,10 +935,10 @@ test_address_get_if_addrs_internal_fail(void *arg) tt_int_op(smartlist_len(results2),OP_EQ,0); rv = get_interface_address6(LOG_ERR, AF_INET6, &ipv6_addr); - tt_assert(rv == -1); + tt_int_op(rv, OP_EQ, -1); rv = get_interface_address(LOG_ERR, &ipv4h_addr); - tt_assert(rv == -1); + tt_int_op(rv, OP_EQ, -1); done: UNMOCK(get_interface_addresses_raw); |