capture file/ line of test case - for reporting on uncaught exceptions

This commit is contained in:
Phil Nash 2011-04-21 08:59:42 +01:00
parent 77d72fb852
commit 81e42ce139
5 changed files with 66 additions and 16 deletions

View file

@ -553,6 +553,8 @@ namespace Catch
m_runningTest->reset();
StreamRedirect coutRedir( std::cout, redirectedCout );
StreamRedirect cerrRedir( std::cerr, redirectedCerr );
m_currentResult.setFileAndLine( m_runningTest->getTestCaseInfo().getFilename(),
m_runningTest->getTestCaseInfo().getLine() );
m_runningTest->getTestCaseInfo().invoke();
m_runningTest->ranToCompletion();
}