Added support for several sequences in 'in'

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@635 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-05-03 20:17:46 +00:00
parent 4ee2837dcd
commit 8d2fb9c94c
6 changed files with 34 additions and 15 deletions

View file

@ -61,7 +61,7 @@ BOOST_AUTO_TEST_CASE( zero_plus_zero_is_zero )
calculator c( v );
mock::sequence s;
MOCK_EXPECT( v.display ).once().with( 0 ).in( s ); // add this expectation to the sequence
MOCK_EXPECT( v.display ).with( 1 ).in( s ); // add this expectation to the sequence after the previous one
MOCK_EXPECT( v.display ).with( 1 ).in( s ); // add this expectation to the sequence after the previous call
c.add( 0, 0 );
c.add( 1, 0 );
}
@ -78,7 +78,7 @@ BOOST_AUTO_TEST_CASE( zero_plus_zero_is_zero )
mock::sequence s1, s2;
MOCK_EXPECT( v.display ).once().with( 0 ).in( s1 );
MOCK_EXPECT( v.display ).once().with( 1 ).in( s2 );
MOCK_EXPECT( v.display ).with( 2 ).in( s1 ).in( s2 ); // add this expectation to both sequences after the previous ones
MOCK_EXPECT( v.display ).with( 2 ).in( s1, s2 ); // add this expectation to both sequences after the previous calls
c.add( 0, 0 );
c.add( 1, 0 );
c.add( 1, 1 );