Change how and when anonymous test cases are named

This commit is contained in:
Martin Hořeňovský
2019-11-04 13:45:39 +01:00
parent 478c324534
commit e6b9b854b5
3 changed files with 6 additions and 8 deletions

View File

@@ -73,12 +73,6 @@ namespace Catch {
}
void TestRegistry::registerTest( TestCase const& testCase ) {
std::string name = testCase.getTestCaseInfo().name;
if( name.empty() ) {
ReusableStringStream rss;
rss << "Anonymous test case " << ++m_unnamedCount;
return registerTest( testCase.withName( rss.str() ) );
}
m_functions.push_back( testCase );
}