summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2010-12-21 16:14:20 +0100
committerGünther Deschner <gd@samba.org>2010-12-22 13:33:17 +0100
commit2e2cb8d96d786c0c9f1b45f41f0758ee07bebf4c (patch)
tree61facdab4d87d8e9223314e09052c3fa56ad4c5e /lib
parent340d2df123813196247d3b1aff38048cfe93c1ec (diff)
downloadsamba-2e2cb8d96d786c0c9f1b45f41f0758ee07bebf4c.tar.gz
samba-2e2cb8d96d786c0c9f1b45f41f0758ee07bebf4c.tar.bz2
samba-2e2cb8d96d786c0c9f1b45f41f0758ee07bebf4c.zip
s4-smbtorture: add torture_assert_nttime_equal macro.
Guenther
Diffstat (limited to 'lib')
-rw-r--r--lib/torture/torture.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/torture/torture.h b/lib/torture/torture.h
index 39f83df4e4..00de5e8efc 100644
--- a/lib/torture/torture.h
+++ b/lib/torture/torture.h
@@ -450,7 +450,13 @@ void torture_result(struct torture_context *test,
} \
} while(0)
-
+#define torture_assert_nttime_equal(torture_ctx,got,expected,cmt) \
+ do { NTTIME __got = got, __expected = expected; \
+ if (!nt_time_equal(&__got, &__expected)) { \
+ torture_result(torture_ctx, TORTURE_FAIL, __location__": "#got" was %s, expected %s: %s", nt_time_string(tctx, __got), nt_time_string(tctx, __expected), cmt); \
+ return false; \
+ }\
+ } while(0)
#define torture_skip(torture_ctx,cmt) do {\
torture_result(torture_ctx, TORTURE_SKIP, __location__": %s", cmt);\