summaryrefslogtreecommitdiff
path: root/test/CuTest.h
diff options
context:
space:
mode:
authorjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2002-12-06 11:44:01 +0000
committerjorton <jorton@13f79535-47bb-0310-9956-ffa450edef68>2002-12-06 11:44:01 +0000
commit3a39d3cc7b9a98c636e49ae6bbfcda975aa709b1 (patch)
tree3927fbd2d886b3dce6e0ec6146a2c36656704447 /test/CuTest.h
parentee377e0f724f3d4b52625ed8c62d3465dd0fa66c (diff)
downloadlibapr-3a39d3cc7b9a98c636e49ae6bbfcda975aa709b1.tar.gz
Add CuAssertSuccess function for giving useful failure messages.
(upstream formatting style maintained in CuTest.c, tabs and all) git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64121 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/CuTest.h')
-rw-r--r--test/CuTest.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/CuTest.h b/test/CuTest.h
index 8d93818bc..3ff882c9b 100644
--- a/test/CuTest.h
+++ b/test/CuTest.h
@@ -32,6 +32,8 @@
#ifndef CU_TEST_H
#define CU_TEST_H
+#include "apr_errno.h" /* for apr_status_t */
+
#include <setjmp.h>
#include <stdarg.h>
@@ -89,6 +91,11 @@ void CuAssertStrEquals(CuTest* tc, const char* expected, const char* actual);
void CuAssertIntEquals(CuTest* tc, int expected, int actual);
void CuAssertPtrEquals(CuTest* tc, const void* expected, const void* actual);
void CuAssertPtrNotNull(CuTest* tc, const void* pointer);
+
+/* Assert that RV is an APR_SUCCESS value; else fail giving strerror
+ * for RV and CONTEXT message. */
+void CuAssertSuccess(CuTest* tc, const char *context, apr_status_t rv);
+
void CuTestRun(CuTest* tc);
/* CuSuite */