apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: apr/test testdso.c
Date Tue, 31 Dec 2002 17:42:45 GMT
wrowe       2002/12/31 09:42:45

  Modified:    test     testdso.c
  Log:
    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.
  
  Revision  Changes    Path
  1.35      +6 -11     apr/test/testdso.c
  
  Index: testdso.c
  ===================================================================
  RCS file: /home/cvs/apr/test/testdso.c,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- testdso.c	29 Dec 2002 22:28:10 -0000	1.34
  +++ testdso.c	31 Dec 2002 17:42:45 -0000	1.35
  @@ -80,7 +80,6 @@
   #endif
   
   static char *modname;
  -static char *libname;
   
   static void test_load_module(CuTest *tc)
   {
  @@ -161,6 +160,9 @@
   }
   
   
  +#ifdef LIB_NAME
  +static char *libname;
  +
   static void test_load_library(CuTest *tc)
   {
       apr_dso_handle_t *h = NULL;
  @@ -239,6 +241,8 @@
       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 @@
       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 @@
       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);
  
  
  

Mime
View raw message