OSDN Git Service

テストコード修正
authoryamada <yamada@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Mon, 14 Dec 2009 01:15:53 +0000 (01:15 +0000)
committeryamada <yamada@1ed66053-1c2d-0410-8867-f7571e6e31d3>
Mon, 14 Dec 2009 01:15:53 +0000 (01:15 +0000)
git-svn-id: http://10.144.169.20/repos/um/branches/l7vsd-3.x-ramiel@9107 1ed66053-1c2d-0410-8867-f7571e6e31d3

l7vsd/unit_tests/l7vsd_test/Makefile
l7vsd/unit_tests/l7vsd_test/l7vsd_test.cpp
l7vsd/unit_tests/l7vsd_test/l7vsd_thread_test.cpp

index 54dd1b8..4301106 100644 (file)
@@ -33,14 +33,20 @@ SRCS2               =       \
 
 
 PARAMETER_SRCS =       \
-                       ../../parameter/parameter.cpp \
-                       ../../parameter/parameter_impl.cpp
+                       ../../src/parameter.cpp \
+                       ../../src/parameter_impl.cpp
+#                      ../../parameter/parameter.cpp \
+#                      ../../parameter/parameter_impl.cpp
 
 LOGGER_SRCS    =       \
-                       ../../logger/logger.cpp \
-                       ../../logger/logger_impl.cpp \
-                       ../../logger/strict_time_based_rolling_policy.cpp \
-                       ../../logger/time_and_size_based_rolling_policy.cpp
+                       ../../src/logger.cpp \
+                       ../../src/logger_impl.cpp \
+                       ../../src/strict_time_based_rolling_policy.cpp \
+                       ../../src/time_and_size_based_rolling_policy.cpp
+#                      ../../logger/logger.cpp \
+#                      ../../logger/logger_impl.cpp \
+#                      ../../logger/strict_time_based_rolling_policy.cpp \
+#                      ../../logger/time_and_size_based_rolling_policy.cpp
 
 .SUFFIXES:     .o .cpp
 .cpp.o:
index 7a757d1..0861fff 100644 (file)
@@ -26,6 +26,7 @@
 #include "snmpbridge_stub.h"
 #include "protocol_module_control_stub.h"
 #include "schedule_module_control_stub.h"
+#include "utility.h"
 
 #include "../../src/l7vsd.cpp"
 
@@ -39,7 +40,7 @@ public:
     boost::thread_group&    get_tg(){ return vs_threads; }
 
     bool&    get_help() { return help; }
-    bool&    get_debug() { return debug; }
+//    bool&    get_debug() { return debug; }
 
     boost::posix_time::ptime&    get_starttime() { return starttime; }
 
@@ -1446,9 +1447,9 @@ void    run_test(){
         // unit_test[204] l7vsd::run normal case 2(help mode) help mode check
         BOOST_CHECK_EQUAL( vsd_test.get_help(), true );
         // unit_test[205] l7vsd::run normal case 2(help mode) debug mode check
-        BOOST_CHECK_EQUAL( vsd_test.get_debug(), false );
+//        BOOST_CHECK_EQUAL( vsd_test.get_debug(), false );
         vsd_test.get_help() = false;
-        vsd_test.get_debug() = false;
+//        vsd_test.get_debug() = false;
 
         // unit_test[206] l7vsd::run normal case 2(help mode) protocol_module_control initialize call check
         BOOST_CHECK_EQUAL( l7vs::protocol_module_control::initialize_called, false );
@@ -1478,7 +1479,6 @@ void    run_test(){
         l7vs::snmpbridge::initialize_fail = false;
         l7vs::snmpbridge::finalize_called = false;
     }
-
 // normal case 3(debug mode)
     {
         int        argc    = 2;
@@ -1489,13 +1489,14 @@ void    run_test(){
         vsd_test.set_exit_requested( 0 );
     
         // unit_test[214] l7vsd::run normal case 3(debug mode) return value check
-        BOOST_CHECK_EQUAL( ret, 0 );
+        BOOST_CHECK_EQUAL( ret, -1 );
+/* デバッグモード廃止の為、削除
         // unit_test[215] l7vsd::run normal case 3(debug mode) delp mode check
         BOOST_CHECK_EQUAL( vsd_test.get_help(), false );
         // unit_test[216] l7vsd::run normal case 3(debug mode) debug mode check
-        BOOST_CHECK_EQUAL( vsd_test.get_debug(), true );
+//        BOOST_CHECK_EQUAL( vsd_test.get_debug(), true );
         vsd_test.get_help() = false;
-        vsd_test.get_debug() = false;
+//        vsd_test.get_debug() = false;
 
         // unit_test[217] l7vsd::run normal case 3(debug mode) protocol_module_control initialize call check
         BOOST_CHECK_EQUAL( l7vs::protocol_module_control::initialize_called, true );
@@ -1513,7 +1514,7 @@ void    run_test(){
         BOOST_CHECK_EQUAL( l7vs::snmpbridge::initialize_called, true );
         // unit_test[224] l7vsd::run normal case 3(debug mode) snmpbridge finalize call check
         BOOST_CHECK_EQUAL( l7vs::snmpbridge::finalize_called, true );
-
+*/
         l7vs::protocol_module_control::initialize_called = false;
         l7vs::protocol_module_control::finalize_called = false;
         l7vs::schedule_module_control::initialize_called = false;
@@ -1536,13 +1537,14 @@ void    run_test(){
         vsd_test.set_exit_requested( 0 );
     
         // unit_test[225] l7vsd::run normal case 4(help and debug mode) return value check
-        BOOST_CHECK_EQUAL( ret, 0 );
+        BOOST_CHECK_EQUAL( ret, -1 );
+/*デバッグモード廃止の為、削除
         // unit_test[226] l7vsd::run normal case 4(help and debug mode) delp mode check
         BOOST_CHECK_EQUAL( vsd_test.get_help(), true );
         // unit_test[227] l7vsd::run normal case 4(help and debug mode) debug mode check
-        BOOST_CHECK_EQUAL( vsd_test.get_debug(), true );
+//        BOOST_CHECK_EQUAL( vsd_test.get_debug(), true );
         vsd_test.get_help() = false;
-        vsd_test.get_debug() = false;
+//        vsd_test.get_debug() = false;
 
         // unit_test[228] l7vsd::run normal case 4(help and debug mode) protocol_module_control initialize call check
         BOOST_CHECK_EQUAL( l7vs::protocol_module_control::initialize_called, false );
@@ -1560,7 +1562,7 @@ void    run_test(){
         BOOST_CHECK_EQUAL( l7vs::snmpbridge::initialize_called, false );
         // unit_test[235] l7vsd::run normal case 4(help and debug mode) snmpbridge finalize call check
         BOOST_CHECK_EQUAL( l7vs::snmpbridge::finalize_called, false );
-
+*/
         l7vs::protocol_module_control::initialize_called = false;
         l7vs::protocol_module_control::finalize_called = false;
         l7vs::schedule_module_control::initialize_called = false;
index 0c0981e..c908d97 100644 (file)
@@ -24,6 +24,7 @@
 #include "snmpbridge_stub.h"
 #include "protocol_module_control_stub.h"
 #include "schedule_module_control_stub.h"
+#include "utility.h"
 
 #include "../../src/l7vsd.cpp"
 
@@ -36,7 +37,7 @@ public:
     boost::thread_group&    get_tg(){ return vs_threads; }
 
     bool&    get_help() { return help; }
-    bool&    get_debug() { return debug; }
+//    bool&    get_debug() { return debug; }
 
     vslist_type::iterator    search_vslist( l7vs::virtualservice_element& in_elem ){
         return l7vsd::search_vslist( in_elem );