Make public yp2_filter_struct non-const. If not, the linker symbol
[metaproxy-moved-to-github.git] / src / test_filter_factory.cpp
index b9190e3..4ee6960 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: test_filter_factory.cpp,v 1.7 2005-12-10 09:59:10 adam Exp $
+/* $Id: test_filter_factory.cpp,v 1.9 2006-01-04 11:55:32 adam Exp $
    Copyright (c) 2005, Index Data.
 
 %LICENSE%
@@ -87,6 +87,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_1 )
     }
 }
 
+#if HAVE_DL_SUPPORT
 #if HAVE_DLFCN_H
 BOOST_AUTO_UNIT_TEST( test_filter_factory_2 )
 {
@@ -95,8 +96,12 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_2 )
         
         const std::string id = "dl";
         
+        // first load
         BOOST_CHECK(ffactory.add_creator_dyn(id, ".libs"));
-        
+
+        // test double load
+        BOOST_CHECK(ffactory.add_creator_dyn(id, ".libs"));
+                
         yp2::filter::Base* filter = 0;
         filter = ffactory.create(id);
 
@@ -112,6 +117,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_2 )
     }
 }
 #endif
+#endif
 
 /*
  * Local variables: