X-Git-Url: http://lists.indexdata.com/cgi-bin?a=blobdiff_plain;f=src%2Ftest_filter_factory.cpp;h=3b6be2c959c5982ac4fb195f71c623eca90db258;hb=ba3cc7674e1ad1531e6bf36cebf0a3ad6c4393e6;hp=b9190e37a7e0f55cd73b241f58f68b288db2c565;hpb=cae80f85741d2564d918a0e3285c62e51491a7fc;p=metaproxy-moved-to-github.git diff --git a/src/test_filter_factory.cpp b/src/test_filter_factory.cpp index b9190e3..3b6be2c 100644 --- a/src/test_filter_factory.cpp +++ b/src/test_filter_factory.cpp @@ -1,8 +1,7 @@ -/* $Id: test_filter_factory.cpp,v 1.7 2005-12-10 09:59:10 adam Exp $ +/* $Id: test_filter_factory.cpp,v 1.11 2006-01-19 09:41:01 adam Exp $ Copyright (c) 2005, Index Data. %LICENSE% - */ #include @@ -11,7 +10,7 @@ #include "config.hpp" #include "filter.hpp" #include "package.hpp" -#include "filter_factory.hpp" +#include "factory_filter.hpp" #define BOOST_AUTO_TEST_MAIN @@ -53,7 +52,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_1 ) { try { - yp2::FilterFactory ffactory; + yp2::FactoryFilter ffactory; XFilter xf; YFilter yf; @@ -87,16 +86,21 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_1 ) } } +#if HAVE_DL_SUPPORT #if HAVE_DLFCN_H BOOST_AUTO_UNIT_TEST( test_filter_factory_2 ) { try { - yp2::FilterFactory ffactory; + yp2::FactoryFilter ffactory; const std::string id = "dl"; - BOOST_CHECK(ffactory.add_creator_dyn(id, ".libs")); - + // first load + BOOST_CHECK(ffactory.add_creator_dl(id, ".libs")); + + // test double load + BOOST_CHECK(ffactory.add_creator_dl(id, ".libs")); + yp2::filter::Base* filter = 0; filter = ffactory.create(id); @@ -112,6 +116,7 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_2 ) } } #endif +#endif /* * Local variables: