Refactoring

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@131 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2010-03-01 23:06:08 +00:00
parent d327700205
commit fb4df4527b
8 changed files with 129 additions and 129 deletions

View file

@ -14,7 +14,7 @@
#define MOCK_ERROR_POLICY silent_error
#include <turtle/object.hpp>
#include <turtle/expectation.hpp>
#include <turtle/function.hpp>
BOOST_AUTO_TEST_CASE( verifying_an_empty_object_succeeds )
{
@ -25,7 +25,7 @@ BOOST_AUTO_TEST_CASE( verifying_an_empty_object_succeeds )
BOOST_AUTO_TEST_CASE( verifying_an_object_containing_a_failing_expectation_fails )
{
mock::object o;
mock::expectation< void() > e;
mock::function< void() > e;
o.set_parent( e );
e.expect().once();
BOOST_CHECK( ! o.verify() );
@ -36,7 +36,7 @@ BOOST_AUTO_TEST_CASE( verifying_an_object_containing_a_failing_expectation_fails
BOOST_AUTO_TEST_CASE( verifying_all_objects_with_one_of_them_containing_a_failing_expectation_fails )
{
mock::object o;
mock::expectation< void() > e;
mock::function< void() > e;
o.set_parent( e );
e.expect().once();
BOOST_CHECK( ! mock::verify() );
@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE( verifying_all_objects_with_one_of_them_containing_a_failin
BOOST_AUTO_TEST_CASE( resetting_an_object_containing_a_failing_expectation_and_verifying_it_succeeds )
{
mock::object o;
mock::expectation< void() > e;
mock::function< void() > e;
o.set_parent( e );
e.expect().once();
o.reset();
@ -57,7 +57,7 @@ BOOST_AUTO_TEST_CASE( resetting_an_object_containing_a_failing_expectation_and_v
BOOST_AUTO_TEST_CASE( an_object_is_assignable_by_sharing_its_state )
{
mock::object o1;
mock::expectation< void() > e;
mock::function< void() > e;
{
mock::object o2;
o2.set_parent( e );
@ -73,7 +73,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::expectation< void() > e;
mock::function< void() > e;
o2->set_parent( e );
e.expect().once();
BOOST_CHECK( ! o2->verify() );