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

Function TEST

tests/CppUTestExt/MockPluginTest.cpp:58–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56};
57
58TEST(MockPlugin, checkExpectationsAndClearAtEnd)
59{
60 MockFailureReporterInstaller failureReporterInstaller;
61
62 MockExpectedCallsListForTest expectations;
63 expectations.addFunction("foobar");
64 MockExpectedCallsDidntHappenFailure expectedFailure(test, expectations);
65
66 mock().expectOneCall("foobar");
67
68 plugin.postTestAction(*test, *result);
69
70 STRCMP_CONTAINS(expectedFailure.getMessage().asCharString(), output.getOutput().asCharString());
71 LONGS_EQUAL(0, mock().expectedCallsLeft());
72 CHECK_NO_MOCK_FAILURE();
73}
74
75TEST(MockPlugin, checkExpectationsWorksAlsoWithHierachicalObjects)
76{

Callers

nothing calls this directly

Calls 15

addFunctionMethod · 0.80
asCharStringMethod · 0.80
getMessageMethod · 0.80
getOutputMethod · 0.80
expectedCallsLeftMethod · 0.80
setTestFunctionMethod · 0.80
assertPrintContainsMethod · 0.80
postTestActionMethod · 0.45
installComparatorMethod · 0.45
clearMethod · 0.45
installCopierMethod · 0.45
preTestActionMethod · 0.45

Tested by

no test coverage detected