summaryrefslogtreecommitdiff
path: root/lib/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-11-03 11:33:16 +0100
committerGünther Deschner <gd@samba.org>2011-11-03 18:35:09 +0100
commit663c2b4f162330871f10e5310af09b5df3b62832 (patch)
tree8abf818027341bf2aa4d3783e77884bfce15600b /lib/torture
parent6e670739003fc522b02327d033dc03fec13d3c29 (diff)
downloadsamba-663c2b4f162330871f10e5310af09b5df3b62832.tar.gz
samba-663c2b4f162330871f10e5310af09b5df3b62832.tar.bz2
samba-663c2b4f162330871f10e5310af09b5df3b62832.zip
torture: add torture_assert_guid_equal() macro.
Guenther
Diffstat (limited to 'lib/torture')
-rw-r--r--lib/torture/torture.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index 00de5e8efc..96cefcf943 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -450,6 +450,16 @@ void torture_result(struct torture_context *test,
} \
} while(0)
+#define torture_assert_guid_equal(torture_ctx,got,expected,cmt)\
+ do { struct GUID __got = (got), __expected = (expected); \
+ if (!GUID_equal(&__got, &__expected)) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" was %s, expected %s: %s", \
+ GUID_string(torture_ctx, &__got), GUID_string(torture_ctx, &__expected), cmt); \
+ return false; \
+ } \
+ } while(0)
+
#define torture_assert_nttime_equal(torture_ctx,got,expected,cmt) \
do { NTTIME __got = got, __expected = expected; \
if (!nt_time_equal(&__got, &__expected)) { \