mirror of
https://github.com/catchorg/Catch2.git
synced 2025-06-02 09:57:54 +00:00
capture file/ line of test case - for reporting on uncaught exceptions
This commit is contained in:
parent
77d72fb852
commit
81e42ce139
5 changed files with 66 additions and 16 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue