TestSuite: Fixed getLocationStr

This commit is contained in:
Daniel Marjamäki 2021-02-27 04:33:16 +01:00
parent 7106e1f48f
commit 199f9608cb
1 changed files with 3 additions and 3 deletions

View File

@ -31,13 +31,13 @@ std::ostringstream output;
/**
* TestRegistry
**/
namespace {
struct CompareFixtures {
bool operator()(const TestFixture* lhs, const TestFixture* rhs) const {
return lhs->classname < rhs->classname;
}
};
}
using TestSet = std::set<TestFixture*, CompareFixtures>;
class TestRegistry {
TestSet _tests;
@ -105,7 +105,7 @@ bool TestFixture::prepareTest(const char testname[])
std::string TestFixture::getLocationStr(const char * const filename, const unsigned int linenr) const
{
return filename + ':' + std::to_string(linenr) + '(' + classname + "::" + mTestname + ')';
return std::string(filename) + ':' + std::to_string(linenr) + '(' + classname + "::" + mTestname + ')';
}
static std::string writestr(const std::string &str, bool gccStyle = false)