diff --git a/test/ip_ostream_test.cpp b/test/ip_ostream_test.cpp index 5f38ad3..683911c 100644 --- a/test/ip_ostream_test.cpp +++ b/test/ip_ostream_test.cpp @@ -54,6 +54,13 @@ template std::string to_string( T const& t ) return os.str(); } +template std::wstring to_wstring( T const& t ) +{ + std::wostringstream os; + os << t; + return os.str(); +} + int main() { boost::intrusive_ptr p1, p2( new X ); @@ -61,5 +68,8 @@ int main() BOOST_TEST_EQ( to_string( p1 ), to_string( p1.get() ) ); BOOST_TEST_EQ( to_string( p2 ), to_string( p2.get() ) ); + BOOST_TEST( to_wstring( p1 ) == to_wstring( p1.get() ) ); + BOOST_TEST( to_wstring( p2 ) == to_wstring( p2.get() ) ); + return boost::report_errors(); } diff --git a/test/lsp_ostream_test.cpp b/test/lsp_ostream_test.cpp index 8365988..5eee565 100644 --- a/test/lsp_ostream_test.cpp +++ b/test/lsp_ostream_test.cpp @@ -13,6 +13,13 @@ template std::string to_string( T const& t ) return os.str(); } +template std::wstring to_wstring( T const& t ) +{ + std::wostringstream os; + os << t; + return os.str(); +} + int main() { boost::local_shared_ptr p1, p2( new int ); @@ -20,5 +27,8 @@ int main() BOOST_TEST_EQ( to_string( p1 ), to_string( p1.get() ) ); BOOST_TEST_EQ( to_string( p2 ), to_string( p2.get() ) ); + BOOST_TEST( to_wstring( p1 ) == to_wstring( p1.get() ) ); + BOOST_TEST( to_wstring( p2 ) == to_wstring( p2.get() ) ); + return boost::report_errors(); } diff --git a/test/sp_ostream_test.cpp b/test/sp_ostream_test.cpp index 3d2092a..f212c99 100644 --- a/test/sp_ostream_test.cpp +++ b/test/sp_ostream_test.cpp @@ -13,6 +13,13 @@ template std::string to_string( T const& t ) return os.str(); } +template std::wstring to_wstring( T const& t ) +{ + std::wostringstream os; + os << t; + return os.str(); +} + int main() { boost::shared_ptr p1, p2( new int ); @@ -20,5 +27,8 @@ int main() BOOST_TEST_EQ( to_string( p1 ), to_string( p1.get() ) ); BOOST_TEST_EQ( to_string( p2 ), to_string( p2.get() ) ); + BOOST_TEST( to_wstring( p1 ) == to_wstring( p1.get() ) ); + BOOST_TEST( to_wstring( p2 ) == to_wstring( p2.get() ) ); + return boost::report_errors(); }