mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Refactoring
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@131 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
d327700205
commit
fb4df4527b
8 changed files with 129 additions and 129 deletions
|
|
@ -18,7 +18,7 @@
|
|||
BOOST_AUTO_TEST_CASE( registering_to_a_sequence_and_calling_out_of_order_throws )
|
||||
{
|
||||
mock::sequence s;
|
||||
mock::expectation< void( int ) > e;
|
||||
mock::function< void( int ) > e;
|
||||
e.expect().once().with( 1 ).in( s );
|
||||
e.expect().once().with( 2 ).in( s );
|
||||
BOOST_CHECK_NO_THROW( e( 2 ) );
|
||||
|
|
@ -28,7 +28,7 @@ BOOST_AUTO_TEST_CASE( registering_to_a_sequence_and_calling_out_of_order_throws
|
|||
BOOST_AUTO_TEST_CASE( registering_to_a_sequence_and_calling_out_of_order_multiple_invocations_throws )
|
||||
{
|
||||
mock::sequence s;
|
||||
mock::expectation< void( int ) > e;
|
||||
mock::function< void( int ) > e;
|
||||
e.expect().with( 1 ).in( s );
|
||||
e.expect().once().with( 2 ).in( s );
|
||||
BOOST_CHECK_NO_THROW( e( 1 ) );
|
||||
|
|
@ -39,7 +39,7 @@ BOOST_AUTO_TEST_CASE( registering_to_a_sequence_and_calling_out_of_order_multipl
|
|||
BOOST_AUTO_TEST_CASE( registering_to_a_sequence_and_calling_in_order_is_valid )
|
||||
{
|
||||
mock::sequence s;
|
||||
mock::expectation< void( int ) > e;
|
||||
mock::function< void( int ) > e;
|
||||
e.expect().once().with( 1 ).in( s );
|
||||
e.expect().once().with( 2 ).in( s );
|
||||
BOOST_CHECK_NO_THROW( e( 1 ) );
|
||||
|
|
@ -49,7 +49,7 @@ BOOST_AUTO_TEST_CASE( registering_to_a_sequence_and_calling_in_order_is_valid )
|
|||
BOOST_AUTO_TEST_CASE( registering_to_a_sequence_enforces_call_order_verification_between_two_different_expectations )
|
||||
{
|
||||
mock::sequence s;
|
||||
mock::expectation< void() > e1, e2;
|
||||
mock::function< void() > e1, e2;
|
||||
e1.expect().once().in( s );
|
||||
e2.expect().once().in( s );
|
||||
BOOST_CHECK_NO_THROW( e2() );
|
||||
|
|
@ -58,7 +58,7 @@ BOOST_AUTO_TEST_CASE( registering_to_a_sequence_enforces_call_order_verification
|
|||
|
||||
BOOST_AUTO_TEST_CASE( destroying_a_sequence_removes_order_call_enforcement )
|
||||
{
|
||||
mock::expectation< void() > e1, e2;
|
||||
mock::function< void() > e1, e2;
|
||||
{
|
||||
mock::sequence s;
|
||||
e1.expect().once().in( s );
|
||||
|
|
@ -71,7 +71,7 @@ BOOST_AUTO_TEST_CASE( destroying_a_sequence_removes_order_call_enforcement )
|
|||
BOOST_AUTO_TEST_CASE( resetting_an_expectation_removes_it_from_order_call_enforcement )
|
||||
{
|
||||
mock::sequence s;
|
||||
mock::expectation< void() > e1, e2;
|
||||
mock::function< void() > e1, e2;
|
||||
e1.expect().once().in( s );
|
||||
e2.expect().once().in( s );
|
||||
e1.reset();
|
||||
|
|
@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE( resetting_an_expectation_removes_it_from_order_call_enforc
|
|||
BOOST_AUTO_TEST_CASE( an_expectation_can_be_used_in_several_sequences )
|
||||
{
|
||||
mock::sequence s1, s2;
|
||||
mock::expectation< void() > e;
|
||||
mock::function< void() > e;
|
||||
e.expect().once().in( s1 ).in( s2 );
|
||||
BOOST_CHECK_NO_THROW( e() );
|
||||
}
|
||||
|
|
@ -89,7 +89,7 @@ BOOST_AUTO_TEST_CASE( an_expectation_can_be_used_in_several_sequences )
|
|||
BOOST_AUTO_TEST_CASE( a_result_specification_is_set_after_a_sequence )
|
||||
{
|
||||
mock::sequence s;
|
||||
mock::expectation< int() > e;
|
||||
mock::function< int() > e;
|
||||
e.expect().once().in( s ).returns( 3 );
|
||||
BOOST_CHECK_EQUAL( 3, e() );
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue