Replaced all file/ line pairings with SourceLineInfo

This commit is contained in:
Phil Nash 2012-05-08 19:16:18 +01:00
parent 81a122e66a
commit 5d1c8f2c6d
9 changed files with 73 additions and 118 deletions

View file

@ -51,8 +51,8 @@ namespace Catch
{
const TestCaseInfo& prev = *m_functions.find( testInfo );
std::cerr << "error: TEST_CASE( \"" << testInfo.getName() << "\" ) already defined.\n"
<< "\tFirst seen at " << SourceLineInfo( prev.getFilename(), prev.getLine() ) << "\n"
<< "\tRedefined at " << SourceLineInfo( testInfo.getFilename(), testInfo.getLine() ) << std::endl;
<< "\tFirst seen at " << SourceLineInfo( prev.getLineInfo() ) << "\n"
<< "\tRedefined at " << SourceLineInfo( testInfo.getLineInfo() ) << std::endl;
exit(1);
}
}
@ -158,11 +158,10 @@ namespace Catch
TestFunction function,
const char* name,
const char* description,
const char* filename,
std::size_t line
const SourceLineInfo& lineInfo
)
{
registerTestCase( new FreeFunctionTestCase( function ), name, description, filename, line );
registerTestCase( new FreeFunctionTestCase( function ), name, description, lineInfo );
}
///////////////////////////////////////////////////////////////////////////
@ -177,11 +176,10 @@ namespace Catch
ITestCase* testCase,
const char* name,
const char* description,
const char* filename,
std::size_t line
const SourceLineInfo& lineInfo
)
{
Hub::getTestCaseRegistry().registerTest( TestCaseInfo( testCase, name, description, filename, line ) );
Hub::getTestCaseRegistry().registerTest( TestCaseInfo( testCase, name, description, lineInfo ) );
}
} // end namespace Catch