diff --git a/test/fixture.cpp b/test/fixture.cpp index fc285294a41..5585ab58b58 100644 --- a/test/fixture.cpp +++ b/test/fixture.cpp @@ -92,7 +92,6 @@ TestFixture::TestFixture(const char * const _name) bool TestFixture::prepareTest(const char testname[]) { - mVerbose = false; mTemplateFormat.clear(); mTemplateLocation.clear(); CppCheck::resetTimerResults(); @@ -439,7 +438,7 @@ void TestFixture::reportErr(const ErrorMessage &msg) return; std::string errormessage; if (!mTemplateFormat.empty()) { - errormessage = msg.toString(mVerbose, mTemplateFormat, mTemplateLocation); + errormessage = msg.toString(false, mTemplateFormat, mTemplateLocation); } else { if (!msg.callStack.empty()) { diff --git a/test/fixture.h b/test/fixture.h index 788b301c542..ebbb3eaa1a7 100644 --- a/test/fixture.h +++ b/test/fixture.h @@ -51,7 +51,6 @@ class TestFixture : public ErrorLogger { static std::size_t fails_counter; static std::size_t todos_counter; static std::size_t succeeded_todos_counter; - bool mVerbose{}; std::string mTemplateFormat; std::string mTemplateLocation; std::string mTestname; @@ -124,10 +123,6 @@ class TestFixture : public ErrorLogger { void assertNoThrowFail(const char * filename, unsigned int linenr, bool bailout) const; static std::string deleteLineNumber(const std::string &message); - void setVerbose(bool v) { - mVerbose = v; - } - void setTemplateFormat(const std::string &templateFormat); void setMultiline() { @@ -319,7 +314,7 @@ class TestInstance { std::unique_ptr impl; }; -#define TEST_CASE( NAME ) do { if (prepareTest(#NAME)) { setVerbose(false); try { NAME(); teardownTest(); } catch (const AssertFailedError&) {} catch (...) { assertNoThrowFail(__FILE__, __LINE__, false); } } } while (false) +#define TEST_CASE( NAME ) do { if (prepareTest(#NAME)) { try { NAME(); teardownTest(); } catch (const AssertFailedError&) {} catch (...) { assertNoThrowFail(__FILE__, __LINE__, false); } } } while (false) #define ASSERT( CONDITION ) assert_(__FILE__, __LINE__, (CONDITION)) #define ASSERT_MSG( CONDITION, MSG ) assert_(__FILE__, __LINE__, (CONDITION), MSG)