aboutsummaryrefslogtreecommitdiff
path: root/src/test/test_util_format.c
diff options
context:
space:
mode:
authorAlexander Færøy <ahf@torproject.org>2017-06-05 14:23:02 +0000
committerNick Mathewson <nickm@torproject.org>2017-08-24 15:24:34 -0400
commitc4744a01cc96b85cc644e07cd2aa5994742a4329 (patch)
tree3c9a50210dc1374934fb9f6e571d7c5c27732a3d /src/test/test_util_format.c
parent9e1fa959201611b764ac90ce59485d33b8ea975b (diff)
downloadtor-c4744a01cc96b85cc644e07cd2aa5994742a4329.tar.gz
tor-c4744a01cc96b85cc644e07cd2aa5994742a4329.zip
Fix operator usage in src/test/*.c
This patch fixes the operator usage in src/test/*.c to use the symbolic operators instead of the normal C comparison operators. This patch was generated using: ./scripts/coccinelle/test-operator-cleanup src/test/*.[ch]
Diffstat (limited to 'src/test/test_util_format.c')
-rw-r--r--src/test/test_util_format.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/test/test_util_format.c b/src/test/test_util_format.c
index ea0a86499f..683d5fdac1 100644
--- a/src/test/test_util_format.c
+++ b/src/test/test_util_format.c
@@ -345,7 +345,7 @@ test_util_format_base32_decode(void *arg)
const char *src = "mjwgc2dcnrswqmjs";
ret = base32_decode(dst, strlen(expected), src, strlen(src));
- tt_int_op(ret, ==, 0);
+ tt_int_op(ret, OP_EQ, 0);
tt_str_op(expected, OP_EQ, dst);
}
@@ -356,7 +356,7 @@ test_util_format_base32_decode(void *arg)
const char *src = "mjwgc2dcnrswq";
ret = base32_decode(dst, strlen(expected), src, strlen(src));
- tt_int_op(ret, ==, 0);
+ tt_int_op(ret, OP_EQ, 0);
tt_mem_op(expected, OP_EQ, dst, strlen(expected));
}
@@ -364,9 +364,9 @@ test_util_format_base32_decode(void *arg)
{
/* Invalid character '#'. */
ret = base32_decode(dst, real_dstlen, "#abcde", 6);
- tt_int_op(ret, ==, -1);
+ tt_int_op(ret, OP_EQ, -1);
/* Make sure the destination buffer has been zeroed even on error. */
- tt_int_op(tor_mem_is_zero(dst, real_dstlen), ==, 1);
+ tt_int_op(tor_mem_is_zero(dst, real_dstlen), OP_EQ, 1);
}
done: