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

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

No files matched your search

+2
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();
}