git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@143 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2010-04-01 21:52:25 +00:00
parent 8310a5ce96
commit 4647bfd007
3 changed files with 7 additions and 7 deletions

View file

@ -92,7 +92,7 @@ namespace detail
void set_parent( E& e, const std::string& prefix,
const std::string& name, const object& o )
{
o.set_parent( e );
o.set_child( e );
o.tag( prefix );
e.tag( name );
}

View file

@ -25,7 +25,7 @@ namespace mock
{}
template< typename T >
void set_parent( T& t ) const
void set_child( T& t ) const
{
t.set_parent( *impl_ );
}

View file

@ -26,7 +26,7 @@ BOOST_AUTO_TEST_CASE( verifying_an_object_containing_a_failing_expectation_fails
{
mock::object o;
mock::function< void() > e;
o.set_parent( e );
o.set_child( e );
e.expect().once();
BOOST_CHECK( ! o.verify() );
o.reset();
@ -37,7 +37,7 @@ BOOST_AUTO_TEST_CASE( verifying_all_objects_with_one_of_them_containing_a_failin
{
mock::object o;
mock::function< void() > e;
o.set_parent( e );
o.set_child( e );
e.expect().once();
BOOST_CHECK( ! mock::verify() );
mock::reset();
@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE( resetting_an_object_containing_a_failing_expectation_and_v
{
mock::object o;
mock::function< void() > e;
o.set_parent( e );
o.set_child( e );
e.expect().once();
o.reset();
BOOST_CHECK( o.verify() );
@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE( an_object_is_assignable_by_sharing_its_state )
mock::function< void() > e;
{
mock::object o2;
o2.set_parent( e );
o2.set_child( e );
e.expect().once();
o1 = o2;
BOOST_CHECK( ! o2.verify() );
@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE( an_object_is_copiable_by_sharing_its_state )
std::auto_ptr< mock::object > o2( new mock::object );
const mock::object o1( *o2 );
mock::function< void() > e;
o2->set_parent( e );
o2->set_child( e );
e.expect().once();
BOOST_CHECK( ! o2->verify() );
BOOST_CHECK( ! o1.verify() );