summaryrefslogtreecommitdiff
path: root/source4/torture/ui.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-06-12 19:49:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:03 -0500
commitb78ebdbfc037a7ffe400edbd08bce7f03968405a (patch)
tree7fe93402fda60fb880dd6ff7af159e32b0f3e1ba /source4/torture/ui.h
parent978dee520e8ceb43c2e63383197a506913d7e8b4 (diff)
downloadsamba-b78ebdbfc037a7ffe400edbd08bce7f03968405a.tar.gz
samba-b78ebdbfc037a7ffe400edbd08bce7f03968405a.tar.bz2
samba-b78ebdbfc037a7ffe400edbd08bce7f03968405a.zip
r16165: Add some more helper utilities
(This used to be commit 584cd50d2bbace27220427ab23d032b2aab7f047)
Diffstat (limited to 'source4/torture/ui.h')
-rw-r--r--source4/torture/ui.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/source4/torture/ui.h b/source4/torture/ui.h
index 04760d6285..8bc309d717 100644
--- a/source4/torture/ui.h
+++ b/source4/torture/ui.h
@@ -78,6 +78,21 @@ struct torture_context
return False; \
}
+#define torture_assert_casestr_equal(ctx,got,expected,string) \
+ if (strcasecmp(got, expected) != 0) { \
+ torture_fail(ctx, "%s:%d (%s): got %s, expected %s", __FILE__, \
+ __LINE__, string, got, expected); \
+ return False; \
+ }
+
+#define torture_assert_str_equal(ctx,got,expected,string) \
+ if (strcmp(got, expected) != 0) { \
+ torture_fail(ctx, "%s:%d (%s): got %s, expected %s", __FILE__, \
+ __LINE__, string, got, expected); \
+ return False; \
+ }
+
+
/* Convenience macros */
#define torture_assert_ntstatus_ok(ctx,expr,string) \
@@ -92,3 +107,4 @@ void torture_comment(struct torture_test *test, const char *comment, ...) _PRINT
void torture_ok(struct torture_test *test);
void torture_fail(struct torture_test *test, const char *reason, ...) _PRINTF_ATTRIBUTE(2,3);
void torture_skip(struct torture_test *test, const char *reason, ...) _PRINTF_ATTRIBUTE(2,3);
+BOOL torture_result(struct torture_context *torture);