1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-26 21:57:41 +03:00

torture: add torture_assert_int_not_equal_goto

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
This commit is contained in:
Michael Adam 2015-03-27 10:02:28 +01:00 committed by Günther Deschner
parent 54e68e94ee
commit bc858fda42

View File

@ -424,6 +424,17 @@ void torture_result(struct torture_context *test,
} \
} while(0)
#define torture_assert_int_not_equal_goto(torture_ctx,got,not_expected,ret,label,cmt)\
do { int __got = (got), __not_expected = (not_expected); \
if (__got == __not_expected) { \
torture_result(torture_ctx, TORTURE_FAIL, \
__location__": "#got" was %d (0x%X), expected a different number: %s", \
__got, __got, cmt); \
ret = false; \
goto label; \
} \
} while(0)
#define torture_assert_u64_equal(torture_ctx,got,expected,cmt)\
do { uint64_t __got = (got), __expected = (expected); \
if (__got != __expected) { \