changes includes in test programs to use splitted header
authorMarc Cromme <marc@indexdata.dk>
Fri, 7 Oct 2005 10:03:07 +0000 (10:03 +0000)
committerMarc Cromme <marc@indexdata.dk>
Fri, 7 Oct 2005 10:03:07 +0000 (10:03 +0000)
src/Makefile.am
src/design_main.cpp [deleted file]
src/test_filter1.cpp
src/test_session1.cpp

index 2843b2b..7600831 100644 (file)
@@ -1,19 +1,19 @@
-## $Id: Makefile.am,v 1.6 2005-10-07 09:21:41 marc Exp $
+## $Id: Makefile.am,v 1.7 2005-10-07 10:03:07 marc Exp $
 
 AM_CXXFLAGS = $(YAZPPINC) $(XSLT_CFLAGS)
 
 
 AM_CXXFLAGS = $(YAZPPINC) $(XSLT_CFLAGS)
 
+YP2_INCHPP = session.hpp package.hpp filter.hpp router.hpp
+
 bin_PROGRAMS =
 check_PROGRAMS = test_filter1 test_filter2 test_session1 \
                 test_thread_pool_observer test_boost_threads
 bin_PROGRAMS =
 check_PROGRAMS = test_filter1 test_filter2 test_session1 \
                 test_thread_pool_observer test_boost_threads
-noinst_PROGRAMS =  p2 design
+noinst_PROGRAMS =  p2 
 
 TESTS=$(check_PROGRAMS)
 
 
 TESTS=$(check_PROGRAMS)
 
-design_SOURCES=design.h  design_main.cpp
-
-test_filter1_SOURCES=test_filter1.cpp
-test_filter2_SOURCES=test_filter2.cpp
-test_session1_SOURCES=test_session1.cpp
+test_filter1_SOURCES=test_filter1.cpp $(YP2_INCHPP)
+test_filter2_SOURCES=test_filter2.cpp $(YP2_INCHPP)
+test_session1_SOURCES=test_session1.cpp $(YP2_INCHPP)
 test_boost_threads_SOURCES=test_boost_threads.cpp
 test_thread_pool_observer_SOURCES = test_thread_pool_observer.cpp \
           thread_pool_observer.cpp thread_pool_observer.h
 test_boost_threads_SOURCES=test_boost_threads.cpp
 test_thread_pool_observer_SOURCES = test_thread_pool_observer.cpp \
           thread_pool_observer.cpp thread_pool_observer.h
diff --git a/src/design_main.cpp b/src/design_main.cpp
deleted file mode 100644 (file)
index c65fc9c..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-
-#include <iostream>
-#include  "design.h"
-
-int main(int argc, char **argv) {
-
-    // test filter set/get/exception
-    try {
-        std::cout << "\nTRY" << "\n";
-        yp2::Filter filter;
-    
-        filter.name("filter1");
-        std::cout << "filter: " << filter.name() << "\n";
-
-        filter.name() = "filter1 rename";
-        std::cout << "filter: " << filter.name() << "\n";
-
-        throw yp2::FilterException("finished");
-    }
-    catch (std::exception &e) {
-        std::cout << e.what() << "\n";
-    }
-
-  
-    try {
-        std::cout << "\nTRY" << "\n";
-
-        yp2::Filter filter1;
-        filter1.name("filter1");
-    
-        yp2::Filter filter2;
-        filter2.name() = "filter2";
-
-        std::cout << "filter1 filter2" << "\n";
-    
-        yp2::Router router1;
-        router1.rule(filter1);
-        std::cout << "router1.rule(filter1)" << "\n";
-
-        yp2::Router router2;
-        router2.rule(filter2);
-        std::cout << "router2.rule(filter2)" << "\n";
-
-        yp2::Package pack_in;
-        pack_in.data(7).router(router1);
-        std::cout << "pack_in.data(7).router(router1)" << "\n";
-
-        pack_in.move();
-        std::cout << "pack_in.move()" << "\n";
-
-        pack_in.router(router2);
-        std::cout << "pack_in.router(router2)" << "\n";
-
-        pack_in.move();
-        std::cout << "pack_in.move()" << "\n";
-
-        throw  yp2::RouterException("finished");
-
-    }
-    catch (std::exception &e) {
-        std::cout << e.what() << "\n";
-    }
-}
-
-/*
- * Local variables:
- * c-basic-offset: 4
- * indent-tabs-mode: nil
- * End:
- * vim: shiftwidth=4 tabstop=8 expandtab
- */
index 1fa0d54..e505c38 100644 (file)
@@ -1,6 +1,9 @@
 
 #include <iostream>
 
 #include <iostream>
-#include "design.h"
+
+#include "filter.hpp"
+//#include "router.hpp"
+//#include "package.hpp"
 
 class TFilter: public yp2::Filter {
 public:
 
 class TFilter: public yp2::Filter {
 public:
index 0c0abc3..47b4d01 100644 (file)
@@ -1,7 +1,12 @@
 
 #include <iostream>
 
 #include <iostream>
-#include "design.h"
-    
+
+//#include "filter.hpp"
+//#include "router.hpp"
+//#include "package.hpp"
+#include "session.hpp"
+
+  
 int main(int argc, char **argv)
 {
     // test session 
 int main(int argc, char **argv)
 {
     // test session