mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Refactored constraints
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@179 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
176611c735
commit
3b6e4f6d37
12 changed files with 204 additions and 454 deletions
|
|
@ -337,13 +337,6 @@ BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_with_failing_custom_constrain
|
|||
}
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE( triggering_an_expectation_with_wrong_parameter_value_in_custom_constraint_calls_unexpected_call_error, error_fixture )
|
||||
{
|
||||
mock::function< void( int ) > f;
|
||||
f.expect().with( mock::constraint( &custom_constraint, "custom constraint" ) );
|
||||
CHECK_ERROR( f( 42 ), unexpected_call, 0 );
|
||||
}
|
||||
|
||||
/*
|
||||
BOOST_FIXTURE_TEST_CASE( literal_zero_can_be_used_in_place_of_null_pointers_in_constraints, error_fixture )
|
||||
{
|
||||
|
|
@ -715,24 +708,6 @@ BOOST_FIXTURE_TEST_CASE( expectation_can_be_serialized_to_be_human_readable, err
|
|||
BOOST_CHECK_EQUAL( expected, to_string( f ) );
|
||||
f.reset();
|
||||
}
|
||||
{
|
||||
mock::function< void( int ) > f;
|
||||
f.tag( "my function" );
|
||||
f.expect().once().with( mock::constraint( &custom_constraint, "custom constraint" ) );
|
||||
const std::string expected = "my function\n"
|
||||
". once().with( custom constraint )";
|
||||
BOOST_CHECK_EQUAL( expected, to_string( f ) );
|
||||
f.reset();
|
||||
}
|
||||
{
|
||||
mock::function< void( int ) > f;
|
||||
f.tag( "my function" );
|
||||
f.expect().once().with( mock::constraint( &custom_constraint, true ) );
|
||||
const std::string expected = "my function\n"
|
||||
". once().with( true )";
|
||||
BOOST_CHECK_EQUAL( expected, to_string( f ) );
|
||||
f.reset();
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_FIXTURE_TEST_CASE( expectation_with_remaining_untriggered_matches_upon_destruction_calls_untriggered_expectation, error_fixture )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue