summaryrefslogtreecommitdiff
path: root/source4/torture/ui.h
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2008-04-14 11:32:04 +0200
committerAndrew Tridgell <tridge@samba.org>2008-04-14 11:32:04 +0200
commit7361899e80c1001eb7d7c13b12ba72cbc3b758f2 (patch)
treeb8e7547f0981c487e328b1aad996850a5378fe35 /source4/torture/ui.h
parent275f32ae2df333c089343dd20fc4efee1bed2b7b (diff)
parent2bb20aa8a8ff1170fd4d2a349a421990b0d7c235 (diff)
downloadsamba-7361899e80c1001eb7d7c13b12ba72cbc3b758f2.tar.gz
samba-7361899e80c1001eb7d7c13b12ba72cbc3b758f2.tar.bz2
samba-7361899e80c1001eb7d7c13b12ba72cbc3b758f2.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into v4-0-test
(This used to be commit 068c973dbeed5b0f5ccab4f780ae7db3535f5910)
Diffstat (limited to 'source4/torture/ui.h')
-rw-r--r--source4/torture/ui.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/torture/ui.h b/source4/torture/ui.h
index 6645d9b012..ec4a658d74 100644
--- a/source4/torture/ui.h
+++ b/source4/torture/ui.h
@@ -253,6 +253,15 @@ void torture_result(struct torture_context *test,
} \
} while(0)
+#define torture_assert_mem_equal(torture_ctx,got,expected,len,cmt)\
+ do { const void *__got = (got), *__expected = (expected); \
+ if (memcmp(__got, __expected, len) != 0) { \
+ torture_result(torture_ctx, TORTURE_FAIL, \
+ __location__": "#got" of len %d did not match"#expected": %s", len, cmt); \
+ return false; \
+ } \
+ } while(0)
+
#define torture_assert_file_contains_text(torture_ctx,filename,expected,cmt)\
do { \
char *__got; \