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

Class MockFailureReporterTestTerminator

src/CppUTestExt/MockFailure.cpp:34–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32#include "CppUTestExt/MockNamedValue.h"
33
34class MockFailureReporterTestTerminator : public NormalTestTerminator
35{
36public:
37 MockFailureReporterTestTerminator(bool crashOnFailure) : crashOnFailure_(crashOnFailure)
38 {
39 }
40
41 virtual void exitCurrentTest() const _override
42 {
43 if (crashOnFailure_)
44 UT_CRASH();
45
46 NormalTestTerminator::exitCurrentTest();
47 } // LCOV_EXCL_LINE
48
49 virtual ~MockFailureReporterTestTerminator() _destructor_override
50 {
51 }
52private:
53 bool crashOnFailure_;
54
55};
56
57void MockFailureReporter::failTest(const MockFailure& failure)
58{

Callers 1

failTestMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected