unit-tests: Fix test_chunk_eq() if arguments have side-effects

This commit is contained in:
Tobias Brunner
2017-05-24 09:34:17 +02:00
parent f8eb636e70
commit 2cbb2271aa
+1 -1
View File
@@ -298,7 +298,7 @@ void test_fail_if_worker_failed();
chunk_t _a = (chunk_t)a; \
chunk_t _b = (chunk_t)b; \
test_fail_if_worker_failed(); \
if (_a.len != _b.len || !memeq(a.ptr, b.ptr, a.len)) \
if (_a.len != _b.len || !memeq(_a.ptr, _b.ptr, _a.len)) \
{ \
test_fail_msg(__FILE__, __LINE__, \
#a " != " #b " (\"%#B\" != \"%#B\")", &_a, &_b); \