MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / assert_

Method assert_

test/fixture.cpp:173–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

171}
172
173void TestFixture::assert_(const char * const filename, const unsigned int linenr, const bool condition, const std::string& msg) const
174{
175 if (!condition) {
176 ++fails_counter;
177 errmsg << getLocationStr(filename, linenr) << ": Assertion failed." << std::endl << "_____" << std::endl;
178 if (!msg.empty())
179 errmsg << "Hint:" << std::endl << msg << std::endl;
180 throw AssertFailedError();
181 }
182}
183
184void TestFixture::assertFailure(const char* const filename, const unsigned int linenr, const std::string& expected, const std::string& actual, const std::string& msg) const
185{

Callers

nothing calls this directly

Calls 2

AssertFailedErrorClass · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected