mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Remove <set> include from the common test path
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#include <assert.h>
|
||||
|
||||
#include <ctime>
|
||||
#include <algorithm>
|
||||
|
||||
namespace Catch {
|
||||
|
||||
@@ -46,6 +47,14 @@ namespace Catch {
|
||||
return std::string(timeStamp);
|
||||
}
|
||||
|
||||
std::string fileNameTag(const std::vector<std::string> &tags) {
|
||||
auto it = std::find_if(begin(tags),
|
||||
end(tags),
|
||||
[] (std::string const& tag) {return tag.front() == '#'; });
|
||||
if (it != tags.end())
|
||||
return it->substr(1);
|
||||
return std::string();
|
||||
}
|
||||
}
|
||||
|
||||
class JunitReporter : public CumulativeReporterBase<JunitReporter> {
|
||||
@@ -125,13 +134,6 @@ namespace Catch {
|
||||
xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite.str() ), false );
|
||||
}
|
||||
|
||||
static std::string fileNameTag( const std::set<std::string> &tags ) {
|
||||
std::set<std::string>::const_iterator it = tags.lower_bound("#");
|
||||
if( it != tags.end() && !it->empty() && it->front() == '#' )
|
||||
return it->substr(1);
|
||||
return std::string();
|
||||
}
|
||||
|
||||
void writeTestCase( TestCaseNode const& testCaseNode ) {
|
||||
TestCaseStats const& stats = testCaseNode.value;
|
||||
|
||||
|
@@ -66,7 +66,7 @@ namespace Catch {
|
||||
m_xml.startElement( "TestCase" )
|
||||
.writeAttribute( "name", trim( testInfo.name ) )
|
||||
.writeAttribute( "description", testInfo.description )
|
||||
.writeAttribute( "tags", testInfo.tagsAsString );
|
||||
.writeAttribute( "tags", testInfo.tagsAsString() );
|
||||
|
||||
writeSourceInfo( testInfo.lineInfo );
|
||||
|
||||
|
Reference in New Issue
Block a user