Added yp2::PlainFile class which reads Unix-style plain text files.
[metaproxy-moved-to-github.git] / src / test_filter_factory.cpp
index fb28d36..3b6be2c 100644 (file)
@@ -1,8 +1,7 @@
-/* $Id: test_filter_factory.cpp,v 1.8 2005-12-11 17:25:59 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 <iostream>
@@ -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;
@@ -92,12 +91,16 @@ BOOST_AUTO_UNIT_TEST( test_filter_factory_1 )
 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);