mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Merged logging branch
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@245 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
4450ea0330
commit
171accfe27
30 changed files with 1025 additions and 434 deletions
|
|
@ -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 >
|
||||
bool operator()( Actual ) const
|
||||
{
|
||||
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 >
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue