From 4cf2592d1209817e8d46169b0e3464a7b5fe89a1 Mon Sep 17 00:00:00 2001 From: Marc Cromme Date: Fri, 7 Oct 2005 10:03:07 +0000 Subject: [PATCH] changes includes in test programs to use splitted header --- src/Makefile.am | 14 +++++----- src/design_main.cpp | 71 ------------------------------------------------- src/test_filter1.cpp | 5 +++- src/test_session1.cpp | 9 +++++-- 4 files changed, 18 insertions(+), 81 deletions(-) delete mode 100644 src/design_main.cpp diff --git a/src/Makefile.am b/src/Makefile.am index 2843b2b..7600831 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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) +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 -noinst_PROGRAMS = p2 design +noinst_PROGRAMS = p2 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 diff --git a/src/design_main.cpp b/src/design_main.cpp deleted file mode 100644 index c65fc9c..0000000 --- a/src/design_main.cpp +++ /dev/null @@ -1,71 +0,0 @@ - -#include -#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 - */ diff --git a/src/test_filter1.cpp b/src/test_filter1.cpp index 1fa0d54..e505c38 100644 --- a/src/test_filter1.cpp +++ b/src/test_filter1.cpp @@ -1,6 +1,9 @@ #include -#include "design.h" + +#include "filter.hpp" +//#include "router.hpp" +//#include "package.hpp" class TFilter: public yp2::Filter { public: diff --git a/src/test_session1.cpp b/src/test_session1.cpp index 0c0abc3..47b4d01 100644 --- a/src/test_session1.cpp +++ b/src/test_session1.cpp @@ -1,7 +1,12 @@ #include -#include "design.h" - + +//#include "filter.hpp" +//#include "router.hpp" +//#include "package.hpp" +#include "session.hpp" + + int main(int argc, char **argv) { // test session -- 1.7.10.4