00001 00016 #include "scalt0.hpp" 00017 00018 #include <stack> 00019 #include <algorithm> 00020 #include <typeinfo> 00021 #include <iostream> 00022 00023 #include <boost/bind.hpp> 00024 #include <boost/foreach.hpp> 00025 00026 #include "eleve/src/typing0.hpp" 00027 00028 BOOST_AUTO_TEST_SUITE (t0) 00029 00030 BOOST_AUTO_TEST_CASE(tt0) 00031 { 00032 BOOST_TEST_MESSAGE("lexical_cast::tt0"); 00033 00034 using namespace eepgwde::detail; 00035 00036 { 00037 bps r(450.0); 00038 00039 std::string s = boost::lexical_cast<std::string>(r); 00040 00041 BOOST_TEST_MESSAGE( r << " " << s ); 00042 } 00043 00044 { 00045 boost::gregorian::date dt(2009, 11, 12); 00046 usdate r(dt); 00047 00048 std::string s = boost::lexical_cast<std::string>(r); 00049 00050 BOOST_TEST_MESSAGE( r << " " << s ); 00051 } 00052 00053 { 00054 std::string s("11-12-2009"); 00055 usdate r = boost::lexical_cast<usdate>(s); 00056 00057 BOOST_TEST_MESSAGE( r << " " << s ); 00058 } 00059 00060 { 00061 boost::gregorian::date dt(2009, 11, 12); 00062 eudate r(dt); 00063 00064 std::string s = boost::lexical_cast<std::string>(r); 00065 00066 BOOST_TEST_MESSAGE( r << " " << s ); 00067 } 00068 00069 { 00070 std::string s("12-11-2009"); 00071 eudate r = boost::lexical_cast<eudate>(s); 00072 00073 BOOST_TEST_MESSAGE( r << " " << s ); 00074 } 00075 00076 { 00077 boost::gregorian::date dt(2009, 11, 12); 00078 posixdate r(dt); 00079 00080 std::string s = boost::lexical_cast<std::string>(r); 00081 00082 BOOST_TEST_MESSAGE( r << " " << s ); 00083 } 00084 00085 { 00086 std::string s("2009-11-12"); 00087 posixdate r = boost::lexical_cast<posixdate>(s); 00088 00089 BOOST_TEST_MESSAGE( r << " " << s ); 00090 } 00091 00092 } 00093 00094 BOOST_AUTO_TEST_SUITE_END() 00095