diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-11-22 12:38:41 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-12-04 12:55:44 +0100 |
commit | 929063bb126b45cfe175a0e9518905bfcc8c95a2 (patch) | |
tree | 782f319dee6ea438cb65fa8ee98baca4ce1a27fd | |
parent | 69ad3f7f90273cb62f67331982a40aa99ea05d90 (diff) | |
download | samba-929063bb126b45cfe175a0e9518905bfcc8c95a2.tar.gz samba-929063bb126b45cfe175a0e9518905bfcc8c95a2.tar.xz samba-929063bb126b45cfe175a0e9518905bfcc8c95a2.zip |
lib/torture: add torture_assert_u64_equal_goto()
metze
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Sat Dec 4 12:55:44 CET 2010 on sn-devel-104
-rw-r--r-- | lib/torture/torture.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/torture/torture.h b/lib/torture/torture.h index 605ba341eba..aeedd71e6b5 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -416,6 +416,19 @@ void torture_result(struct torture_context *test, } \ } while(0) +#define torture_assert_u64_equal_goto(torture_ctx,got,expected,ret,label,cmt)\ + do { uint64_t __got = (got), __expected = (expected); \ + if (__got != __expected) { \ + torture_result(torture_ctx, TORTURE_FAIL, \ + __location__": "#got" was %llu (0x%llX), expected %llu (0x%llX): %s", \ + (unsigned long long)__got, (unsigned long long)__got, \ + (unsigned long long)__expected, (unsigned long long)__expected, \ + cmt); \ + ret = false; \ + goto label; \ + } \ + } while(0) + #define torture_assert_errno_equal(torture_ctx,expected,cmt)\ do { int __expected = (expected); \ if (errno != __expected) { \ |