libt2n: (gerd) fixes, new logging concept (not working yet)
[libt2n] / test / simplecmd.cpp
index b48fab6..9c1472b 100644 (file)
 #include <cppunit/ui/text/TestRunner.h>
 #include <cppunit/extensions/HelperMacros.h>
 
+
+#include <boost/archive/binary_oarchive.hpp>
+#include <boost/archive/binary_iarchive.hpp>
+#include <boost/serialization/serialization.hpp>
+
 #include <container.hxx>
 #include <socket_client.hxx>
 #include <socket_server.hxx>
 #include <command_client.hxx>
 #include <command_server.hxx>
 
-#include <boost/serialization/serialization.hpp>
-#include <boost/serialization/level.hpp>
-#include <boost/serialization/tracking.hpp>
-#include <boost/serialization/export.hpp>
-
 using namespace std;
 using namespace libt2n;
 using namespace CppUnit;
@@ -69,6 +69,7 @@ class testfunc_res : public result
         }
 };
 
+
 class testfunc_cmd : public libt2n::command
 {
     private:
@@ -78,7 +79,6 @@ class testfunc_cmd : public libt2n::command
         template<class Archive>
         void serialize(Archive & ar, const unsigned int version)
         {
-            cerr << "ser: testfunc_cmd" << endl;
             ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(libt2n::command);
             ar & BOOST_SERIALIZATION_NVP(param);
         }
@@ -98,6 +98,7 @@ class testfunc_cmd : public libt2n::command
         }
 };
 
+#include <boost/serialization/export.hpp>
 
 BOOST_CLASS_EXPORT(testfunc_cmd)
 BOOST_CLASS_EXPORT(testfunc_res)
@@ -134,7 +135,6 @@ class test_simplecmd : public TestFixture
             // child
             {
                 socket_server ss("./socket");
-                ss.set_logging(&cerr,debug);
                 command_server cs(ss);
 
                 // max 10 sec
@@ -151,6 +151,7 @@ class test_simplecmd : public TestFixture
                 // wait till server is up
                 sleep(1);
                 socket_client_connection sc("./socket");
+                sc.set_logging(&cerr,debug);
                 command_client cc(sc);
 
                 result_container rc;