Merged the logging branch

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@220 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2011-01-29 21:34:45 +00:00
parent 78befdb9be
commit f7be6ea503
12 changed files with 517 additions and 314 deletions

View file

@ -329,6 +329,41 @@ BOOST_AUTO_TEST_CASE( boost_optional_on_base_class_reference_as_return_type_is_s
b.method();
}
namespace
{
bool serialized = false;
struct custom_argument
{
friend std::ostream& operator<<( std::ostream& s, const custom_argument& )
{
serialized = true;
return s;
}
};
struct custom_constraint
{
template< typename Actual >
friend bool operator==( Actual, const custom_constraint& )
{
return true;
}
friend std::ostream& operator<<( std::ostream& s, const custom_constraint& )
{
serialized = true;
return s;
}
};
}
BOOST_AUTO_TEST_CASE( constraints_and_arguments_are_serialized_lazily )
{
MOCK_FUNCTOR( void( custom_argument ) ) f;
MOCK_EXPECT( f, _ ).with( custom_constraint() );
f( custom_argument() );
BOOST_CHECK( ! serialized );
}
namespace
{
template< typename Expected >