Throwing an exception disables the automatic verification upon destruction

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@15 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2009-08-30 23:02:45 +00:00
parent 42d1e5add3
commit 7781ba4e58
2 changed files with 19 additions and 5 deletions

View file

@ -760,3 +760,15 @@ BOOST_FIXTURE_TEST_CASE( adding_a_matcher_reactivates_the_verification_upon_dest
e.expect().once();
untriggered_expectation_exp.expect().once();
}
BOOST_FIXTURE_TEST_CASE( throwing_an_exception_disables_the_automatic_verification_upon_destruction, error_guard )
{
try
{
mock::expectation< void(), mock_error > e;
e.expect().once();
throw std::exception();
}
catch( std::exception& )
{}
}