libt2n: (gerd) fix & improve logging
[libt2n] / test / simplecmd.cpp
index 9c1472b..462a03f 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/archive/xml_oarchive.hpp>
+#include <boost/archive/xml_iarchive.hpp>
 #include <boost/serialization/serialization.hpp>
 
 #include <container.hxx>
@@ -31,7 +32,6 @@
 #include <command_server.hxx>
 
 using namespace std;
-using namespace libt2n;
 using namespace CppUnit;
 
 string testfunc(const string& str)
@@ -41,7 +41,7 @@ string testfunc(const string& str)
     return ret;
 }
 
-class testfunc_res : public result
+class testfunc_res : public libt2n::result
 {
     private:
         string res;
@@ -50,7 +50,7 @@ class testfunc_res : public result
         template<class Archive>
         void serialize(Archive & ar, const unsigned int version)
         {
-            ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(result);
+            ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(libt2n::result);
             ar & BOOST_SERIALIZATION_NVP(res);
         }
 
@@ -92,7 +92,7 @@ class testfunc_cmd : public libt2n::command
             param=str;
         }
 
-        result* operator()()
+        libt2n::result* operator()()
         {
             return new testfunc_res(testfunc(param));
         }
@@ -103,6 +103,8 @@ class testfunc_cmd : public libt2n::command
 BOOST_CLASS_EXPORT(testfunc_cmd)
 BOOST_CLASS_EXPORT(testfunc_res)
 
+using namespace libt2n;
+
 class test_simplecmd : public TestFixture
 {
     CPPUNIT_TEST_SUITE(test_simplecmd);