MCPcopy Create free account
hub / github.com/cpputest/cpputest / checkTestFailsWithProperTestLocation

Method checkTestFailsWithProperTestLocation

src/CppUTest/TestTestingFixture.cpp:184–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

182}
183
184void TestTestingFixture::checkTestFailsWithProperTestLocation(const char* text, const char* file, size_t line)
185{
186 if (getFailureCount() != 1)
187 FAIL_LOCATION(StringFromFormat("Expected one test failure, but got %d amount of test failures", (int) getFailureCount()).asCharString(), file, line);
188
189 STRCMP_CONTAINS_LOCATION(text, output_->getOutput().asCharString(), "", file, line);
190
191 if (lineOfCodeExecutedAfterCheck)
192 FAIL_LOCATION("The test should jump/throw on failure and not execute the next line. However, the next line was executed.", file, line);
193}
194

Callers

nothing calls this directly

Calls 3

StringFromFormatFunction · 0.85
asCharStringMethod · 0.80
getOutputMethod · 0.80

Tested by

no test coverage detected