summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2002-12-29 22:28:11 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>2002-12-29 22:28:11 +0000
commit9d89ed33606af4304458a72e2bb76d95624a27e1 (patch)
tree6407507b839686103e6973eee313dbfd5be94563 /test
parent7b37cd40b18f6d5ebb8604b51cd57e191e609b55 (diff)
downloadlibapr-9d89ed33606af4304458a72e2bb76d95624a27e1.tar.gz
standardize on a couple of easy to test for error codes for DSO errors.
This doesn't work fully on Windows yet, that is the next commit. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64233 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/testdso.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/testdso.c b/test/testdso.c
index 2d04507c2..fe720aa97 100644
--- a/test/testdso.c
+++ b/test/testdso.c
@@ -157,7 +157,7 @@ static void test_unload_module(CuTest *tc)
CuAssert(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
status = apr_dso_sym(&func1, h, "print_hello");
- CuAssertIntEquals(tc, APR_EINIT, status);
+ CuAssertIntEquals(tc, 1, APR_STATUS_IS_ESYMNOTFOUND(status));
}
@@ -234,26 +234,28 @@ static void test_unload_library(CuTest *tc)
status = apr_dso_unload(h);
CuAssert(tc, apr_dso_error(h, errstr, 256), APR_SUCCESS == status);
+
+ status = apr_dso_sym(&func1, h, "print_hello");
+ CuAssertIntEquals(tc, 1, APR_STATUS_IS_ESYMNOTFOUND(status));
}
static void test_load_notthere(CuTest *tc)
{
apr_dso_handle_t *h = NULL;
- char errstr[256];
apr_status_t status;
status = apr_dso_load(&h, "No_File.so", p);
- /* Original test was status == APR_EDSOOPEN, but that's not valid
- * with DSO_USE_SHL (HP/UX etc), OS2 or Win32. Accept simple failure.
- */
- CuAssert(tc, apr_dso_error(h, errstr, 256), status);
+
+ CuAssertIntEquals(tc, 1, APR_STATUS_IS_EDSOOPEN(status));
CuAssertPtrNotNull(tc, h);
}
+#ifndef LIB_NAME
static void library_not_impl(CuTest *tc)
{
CuNotImpl(tc, "Loadable libraries and modules are equivilant on this platform");
}
+#endif
CuSuite *testdso(void)
{