summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-12-31 17:42:45 +0000
committerwrowe <wrowe@13f79535-47bb-0310-9956-ffa450edef68>2002-12-31 17:42:45 +0000
commit235b55c145f7d512774b3fdad3e088a83539a926 (patch)
tree6320eb26f8c508a9b24fab251ef7043ed6f05086 /test
parentfcc44073ce554512bfbebb273959c862bbd824b4 (diff)
downloadlibapr-235b55c145f7d512774b3fdad3e088a83539a926.tar.gz
Agreed with Ryan... it's entirely redundant to run the tests twice where
libraries and modules are identical (although you may by defining LIB_NAME the same as MOD_NAME)... and it makes no sense to emit a not-implemented message in this case. Drop the exception, and exclude the _library() fns if LIB_NAME is undefined. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64242 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/testdso.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/test/testdso.c b/test/testdso.c
index fe720aa97..75deef2df 100644
--- a/test/testdso.c
+++ b/test/testdso.c
@@ -80,7 +80,6 @@
#endif
static char *modname;
-static char *libname;
static void test_load_module(CuTest *tc)
{
@@ -161,6 +160,9 @@ static void test_unload_module(CuTest *tc)
}
+#ifdef LIB_NAME
+static char *libname;
+
static void test_load_library(CuTest *tc)
{
apr_dso_handle_t *h = NULL;
@@ -239,6 +241,8 @@ static void test_unload_library(CuTest *tc)
CuAssertIntEquals(tc, 1, APR_STATUS_IS_ESYMNOTFOUND(status));
}
+#endif /* def(LIB_NAME) */
+
static void test_load_notthere(CuTest *tc)
{
apr_dso_handle_t *h = NULL;
@@ -250,13 +254,6 @@ static void test_load_notthere(CuTest *tc)
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)
{
CuSuite *suite = CuSuiteNew("DSO");
@@ -270,9 +267,7 @@ CuSuite *testdso(void)
SUITE_ADD_TEST(suite, test_dso_sym_return_value);
SUITE_ADD_TEST(suite, test_unload_module);
-#ifndef LIB_NAME
- SUITE_ADD_TEST(suite, library_not_impl);
-#else
+#ifdef LIB_NAME
libname = apr_pcalloc(p, 256);
getcwd(libname, 256);
libname = apr_pstrcat(p, libname, "/", LIB_NAME, NULL);