Merged logging branch

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@275 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2011-03-20 23:13:35 +00:00
parent 7d06ec5290
commit acc660f2a3
7 changed files with 179 additions and 237 deletions

View file

@ -408,35 +408,16 @@ BOOST_AUTO_TEST_CASE( boost_assign_map_list_of_are_serialized_without_conversion
namespace
{
struct false_positive_container
{
typedef int const_iterator;
};
BOOST_MPL_ASSERT(( mock::detail::is_container< false_positive_container > ));
mock::stream& operator<<( mock::stream& s, false_positive_container )
{
return s << "false_positive_container";
}
void callable_builtin()
{}
}
BOOST_AUTO_TEST_CASE( false_positive_container_serialization_can_still_be_overriden_without_conversions )
BOOST_AUTO_TEST_CASE( callable_builtin_yields_an_interrogation_mark_when_serialized_without_conversions )
{
BOOST_CHECK_EQUAL( "false_positive_container", to_string( false_positive_container() ) );
BOOST_CHECK_EQUAL( "?", to_string( callable_builtin ) );
BOOST_CHECK_EQUAL( "?", to_string( &callable_builtin ) );
}
//namespace
//{
// void callable_builtin()
// {}
//}
//
//BOOST_AUTO_TEST_CASE( callable_builtin_yields_an_interrogation_mark_when_serialized_without_conversions )
//{
// BOOST_CHECK_EQUAL( "?", to_string( callable_builtin ) );
// BOOST_CHECK_EQUAL( "?", to_string( &callable_builtin ) );
//}
namespace
{
struct serialized_using_format
@ -467,6 +448,21 @@ BOOST_AUTO_TEST_CASE( type_can_use_format_when_streamed_without_conversions )
BOOST_CHECK_EQUAL( "\"string\"", to_string( streamed_using_format() ) );
}
namespace
{
struct std_string_streamed
{};
mock::stream& operator<<( mock::stream& s, const std_string_streamed& )
{
return s << std::string( "string" );
}
}
BOOST_AUTO_TEST_CASE( std_string_streamed_is_not_a_container_without_conversions )
{
BOOST_CHECK_EQUAL( "string", to_string( std_string_streamed() ) );
}
namespace mock
{
namespace detail