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

@ -151,10 +151,12 @@ namespace Catch
(
TestFunction function,
const char* name,
const char* description
const char* description,
const char* filename,
std::size_t line
)
{
registerTestCase( new FreeFunctionTestCase( function ), name, description );
registerTestCase( new FreeFunctionTestCase( function ), name, description, filename, line );
}
///////////////////////////////////////////////////////////////////////////
@ -168,10 +170,12 @@ namespace Catch
(
ITestCase* testCase,
const char* name,
const char* description
const char* description,
const char* filename,
std::size_t line
)
{
Hub::getTestCaseRegistry().registerTest( TestCaseInfo( testCase, name, description ) );
Hub::getTestCaseRegistry().registerTest( TestCaseInfo( testCase, name, description, filename, line ) );
}
} // end namespace Catch