s4:torture:raw:notify: improve the CHECK_WSTR() macro
authorMichael Adam <obnox@samba.org>
Thu, 26 Mar 2015 18:11:16 +0000 (19:11 +0100)
committerGünther Deschner <gd@samba.org>
Mon, 30 Mar 2015 11:41:26 +0000 (13:41 +0200)
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
source4/torture/raw/notify.c

index effe8ebfde83e34e32611d94d91914adc85c772c..8f6675ddffeba1389343457dbbb437e2cf347bfa 100644 (file)
 
 #define CHECK_WSTR(tctx, field, value, flags) \
 do { \
-       if (!field.s || strcmp(field.s, value) || \
-           wire_bad_flags(&field, flags, cli->transport)) { \
-               torture_result(tctx, TORTURE_FAIL, \
-                   "(%d) %s [%s] != %s\n",  __LINE__, #field, field.s, value); \
-       } \
+       torture_assert_str_equal(tctx, field.s, value, "values don't match"); \
+       torture_assert(tctx, \
+                      !wire_bad_flags(&field, STR_UNICODE, cli->transport), \
+                      "wire_bad_flags"); \
 } while (0)
 
 /*