From 199f9608cbdff7d05df1b396b3160c78950bacc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Sat, 27 Feb 2021 04:33:16 +0100 Subject: [PATCH] TestSuite: Fixed getLocationStr --- test/testsuite.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/testsuite.cpp b/test/testsuite.cpp index 4d3a1d396..d7bf76c4d 100644 --- a/test/testsuite.cpp +++ b/test/testsuite.cpp @@ -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; 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)