Removed call notifications upon mock object destruction

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@690 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2013-08-31 08:11:06 +00:00
parent 69b58ee09d
commit 86319a23d5
4 changed files with 0 additions and 19 deletions

View file

@ -167,14 +167,12 @@ BOOST_FIXTURE_TEST_CASE( verifying_an_unlimited_expectation_succeeds, error_fixt
BOOST_CHECK( f.verify() );
CHECK_CALLS( 0 );
}
CHECK_CALLS( 1 );
{
mock::detail::function< int( int, const std::string& ) > f;
f.expect();
BOOST_CHECK( f.verify() );
CHECK_CALLS( 0 );
}
CHECK_CALLS( 1 );
}
BOOST_FIXTURE_TEST_CASE( verifying_a_once_expectation_after_one_call_succeeds, error_fixture )

View file

@ -46,11 +46,6 @@ namespace detail
return result;
}
bool invoked() const
{
return i_->invoked();
}
const char* file() const
{
return file_;

View file

@ -53,16 +53,10 @@ namespace detail
if( valid_ && ! std::uncaught_exception() )
for( expectations_cit it = expectations_.begin();
it != expectations_.end(); ++it )
{
if( ! it->verify() )
error_type::fail( "untriggered expectation",
boost::unit_test::lazy_ostream::instance()
<< *this, it->file(), it->line() );
else if( ! it->invoked() )
error_type::call(
boost::unit_test::lazy_ostream::instance()
<< *this, it->file(), it->line() );
}
if( context_ )
context_->remove( *this );
}

View file

@ -28,7 +28,6 @@ namespace detail
virtual bool invoke() = 0;
virtual bool verify() const = 0;
virtual bool invoked() const = 0;
virtual bool exhausted() const = 0;
friend std::ostream& operator<<( std::ostream& s, const invocation& i )
@ -60,11 +59,6 @@ namespace detail
return true;
}
virtual bool invoked() const
{
return count_ > 0;
}
virtual bool exhausted() const
{
return count_ >= max_;