} \
} while(0)
+#define torture_assert_size_equal(torture_ctx,got,expected,cmt)\
+ do { size_t __got = (got), __expected = (expected); \
+ if (__got != __expected) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %zu (0x%zX), expected %zu (0x%zX): %s", \
+ __got, __got, \
+ __expected, __expected, \
+ cmt); \
+ return false; \
+ } \
+ } while(0)
+
+#define torture_assert_size_equal_goto(torture_ctx,got,expected,ret,label,cmt)\
+ do { size_t __got = (got), __expected = (expected); \
+ if (__got != __expected) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %zu (0x%zX), expected %zu (0x%zX): %s", \
+ __got, __got, \
+ __expected, __expected, \
+ cmt); \
+ ret = false; \
+ goto label; \
+ } \
+ } while(0)
+
+#define torture_assert_size_not_equal(torture_ctx,got,not_expected,cmt)\
+ do { size_t __got = (got), __not_expected = (not_expected); \
+ if (__got == __not_expected) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %zu (0x%zX), expected a different number: %s", \
+ __got, __got, \
+ cmt); \
+ return false; \
+ } \
+ } while(0)
+
+#define torture_assert_size_not_equal_goto(torture_ctx,got,not_expected,ret,label,cmt)\
+ do { size_t __got = (got), __not_expected = (not_expected); \
+ if (__got == __not_expected) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %zu (0x%zX), expected a different number: %s", \
+ __got, __got, \
+ cmt); \
+ ret = false; \
+ goto label; \
+ } \
+ } while(0)
+
#define torture_assert_errno_equal(torture_ctx,expected,cmt)\
do { int __expected = (expected); \
if (errno != __expected) { \