summaryrefslogtreecommitdiff
path: root/test/CuTest.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/CuTest.c')
-rw-r--r--test/CuTest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/CuTest.c b/test/CuTest.c
index 6b15bcef1..9e1b3792a 100644
--- a/test/CuTest.c
+++ b/test/CuTest.c
@@ -216,6 +216,16 @@ void CuAssertPtrNotNull(CuTest* tc, const void* pointer)
CuFail(tc, buf);
}
+void CuAssertSuccess(CuTest* tc, const char* context, apr_status_t rv)
+{
+ if (!APR_STATUS_IS_SUCCESS(rv)) {
+ char buf[STRING_MAX], ebuf[128];
+ sprintf(buf, "%s (%d): %s\n", context, rv,
+ apr_strerror(rv, ebuf, sizeof ebuf));
+ CuFail(tc, buf);
+ }
+}
+
void CuTestRun(CuTest* tc)
{
jmp_buf buf;