aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_addr.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2019-10-09 13:24:16 -0400
committerNick Mathewson <nickm@torproject.org>2019-10-22 09:32:13 -0400
commit7e7a4874b8fa333d1840cc5f2c0b118d6a0e7c47 (patch)
tree3279b6cb27ae2884d07081b34ee0322fce4a1000 /src/test/test_addr.c
parent0da349aa5ebc6d33c92a4f979002c2b0282afc41 (diff)
downloadtor-7e7a4874b8fa333d1840cc5f2c0b118d6a0e7c47.tar.gz
tor-7e7a4874b8fa333d1840cc5f2c0b118d6a0e7c47.zip
test_addr.c: use COCCI to suppress macros coccinelle cannot parse.
Diffstat (limited to 'src/test/test_addr.c')
-rw-r--r--src/test/test_addr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test_addr.c b/src/test/test_addr.c
index 50543293c4..09faa540f4 100644
--- a/src/test/test_addr.c
+++ b/src/test/test_addr.c
@@ -51,6 +51,7 @@ test_addr_basic(void *arg)
;
}
+#ifndef COCCI
#define test_op_ip6_(a,op,b,e1,e2) \
STMT_BEGIN \
tt_assert_test_fmt_type(a,b,e1" "#op" "e2,struct in6_addr*, \
@@ -68,6 +69,7 @@ test_addr_basic(void *arg)
TT_EXIT_TEST_FUNCTION \
); \
STMT_END
+#endif
/** Helper: Assert that two strings both decode as IPv6 addresses with
* tor_inet_pton(), and both decode to the same address. */
@@ -110,6 +112,7 @@ test_addr_basic(void *arg)
TT_DIE(("%s was not internal", a)); \
STMT_END
+#ifndef COCCI
/** Helper: Assert that <b>a</b> and <b>b</b>, when parsed by
* tor_inet_pton(), give addresses that compare in the order defined by
* <b>op</b> with tor_addr_compare(). */
@@ -134,6 +137,7 @@ test_addr_basic(void *arg)
TT_DIE(("Failed: tor_addr_compare_masked(%s,%s,%d) %s 0", \
a, b, m, #op)); \
STMT_END
+#endif
/** Helper: assert that <b>xx</b> is parseable as a masked IPv6 address with
* ports by tor_parse_mask_addr_ports(), with family <b>f</b>, IP address