diff options
author | Stefan Metzmacher <metze@samba.org> | 2010-04-09 13:23:53 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2010-04-09 16:28:29 +0200 |
commit | 800c735de6f3c7401089dd0c49ac2a253b24da4c (patch) | |
tree | 251119fac25ab1bb3d087157ffffbf7a2d61858f /lib/torture | |
parent | f716c027c68452f4f0eb01df1e0ccca4a2a69950 (diff) | |
download | samba-800c735de6f3c7401089dd0c49ac2a253b24da4c.tar.gz |
lib/torture: also print intergers as HEX values in the torture_assert macros
metze
Diffstat (limited to 'lib/torture')
-rw-r--r-- | lib/torture/torture.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/torture/torture.h b/lib/torture/torture.h index af61ac189f..6eb2c1593d 100644 --- a/lib/torture/torture.h +++ b/lib/torture/torture.h @@ -372,8 +372,8 @@ void torture_result(struct torture_context *test, do { int __got = (got), __expected = (expected); \ if (__got != __expected) { \ torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %d, expected %d: %s", \ - __got, __expected, cmt); \ + __location__": "#got" was %d (0x%X), expected %d (0x%X): %s", \ + __got, __got, __expected, __expected, cmt); \ return false; \ } \ } while(0) @@ -382,8 +382,8 @@ void torture_result(struct torture_context *test, do { int __got = (got), __expected = (expected); \ if (__got != __expected) { \ torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %d, expected %d: %s", \ - __got, __expected, cmt); \ + __location__": "#got" was %d (0x%X), expected %d (0x%X): %s", \ + __got, __got, __expected, __expected, cmt); \ ret = false; \ goto label; \ } \ @@ -393,8 +393,10 @@ void torture_result(struct torture_context *test, do { uint64_t __got = (got), __expected = (expected); \ if (__got != __expected) { \ torture_result(torture_ctx, TORTURE_FAIL, \ - __location__": "#got" was %llu, expected %llu: %s", \ - (unsigned long long)__got, (unsigned long long)__expected, cmt); \ + __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); \ return false; \ } \ } while(0) |