From: stephan b. <sg...@us...> - 2004-12-28 17:32:29
|
Update of /cvsroot/pclasses/pclasses2/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28211/test Modified Files: s11nTest.cpp Log Message: Now demonstrates Time, Date, and DateTime s11n. Index: s11nTest.cpp =================================================================== RCS file: /cvsroot/pclasses/pclasses2/test/s11nTest.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- s11nTest.cpp 28 Dec 2004 04:24:17 -0000 1.6 +++ s11nTest.cpp 28 Dec 2004 17:32:19 -0000 1.7 @@ -5,7 +5,10 @@ #include <pclasses/s11n/pods_streamable.h> #include <pclasses/s11n/list.h> #include <pclasses/s11n/map.h> -#include <pclasses/Util/LexT.h> + +#include <pclasses/s11n/proxy/Time_s11n.h> +#include <pclasses/s11n/proxy/LexT_s11n.h> + #include <pclasses/Util/StringTool.h> #include <memory> // auto_ptr #include <cassert> @@ -18,7 +21,7 @@ typedef std::list<std::string> TestListType2; typedef std::list<P::Util::LexT> TestListType; -// compiler bug, gcc 3.3.5 20040809 +// compiler bug, gcc 3.3.5 20040809: // When adding :: before P in the above decl it fails // with a 'parse error before :', but it allows // me to do :: on the map here: @@ -444,5 +447,17 @@ CERR << "casted-to list (size=="<<list2.size()<<"):\n"; save( list2, std::cout ); + + CERR << "Time...\n"; + using P::Time; + using P::Date; + using P::DateTime; + Time thetime( 12, 13, 14 ); + Date thedate( 2005, 1, 30 ); + DateTime dt( thedate, thetime ); + save( thetime, std::cout ); + save( thedate, std::cout ); + save( dt, std::cout ); + return 0; } |