mirror of
https://github.com/mat007/turtle.git
synced 2026-06-22 12:13:43 +00:00
Fixed a bug in sequence specification
git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@25 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
parent
1d13a3fcde
commit
64ef3b48dc
2 changed files with 31 additions and 11 deletions
|
|
@ -76,3 +76,19 @@ BOOST_AUTO_TEST_CASE( resetting_an_expectation_removes_it_from_order_call_enforc
|
|||
e1.reset();
|
||||
BOOST_CHECK_NO_THROW( e2() );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( an_expectation_can_be_used_in_several_sequences )
|
||||
{
|
||||
mock::sequence s1, s2;
|
||||
mock::expectation< void() > e;
|
||||
e.expect().once().in( s1 ).in( s2 );
|
||||
BOOST_CHECK_NO_THROW( e() );
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE( a_result_specification_is_set_after_a_sequence )
|
||||
{
|
||||
mock::sequence s;
|
||||
mock::expectation< 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