Fixed missing file name and line number in logs

git-svn-id: https://svn.code.sf.net/p/turtle/code/trunk@576 860be788-9bd5-4423-9f1e-828f051e677b
This commit is contained in:
mat007 2012-11-28 21:57:03 +00:00
parent 2b0ef7328c
commit c7a609404f
3 changed files with 19 additions and 4 deletions

View file

@ -718,3 +718,12 @@ BOOST_FIXTURE_TEST_CASE( throwing_an_exception_disables_the_automatic_verificati
catch( std::exception& )
{}
}
BOOST_FIXTURE_TEST_CASE( adding_file_and_line_number_information, error_fixture )
{
mock::detail::function< void() > f;
f.expect( "file name", 42 ).once();
CHECK_ERROR( f.verify(), "verification failed", 0, "?\n. once()" );
BOOST_CHECK_EQUAL( "file name", data().last_file );
BOOST_CHECK_EQUAL( 42, data().last_line );
}