Mockpp as no test framework of its own. More...
Classes | |
class | mockpp::CxxTestRunner |
Helper class to run tests with CxxTest framework. More... | |
class | mockpp::VerifyingTestCaller< VerifyingFixtureType, DoTheVerify > |
VerifyingTestCaller that verifies Verifiable fields and registered Verifiable objects after the test has run and before the fixture has been torn down. More... | |
class | mockpp::VerifyingTestCase |
TestCase that verifies Verifiable fields and registered Verifiable objects after the test has run and before the fixture has been torn down. More... | |
Defines | |
#define | MOCKPP_CXXTEST_SUITE_REGISTRATION(classname) |
Register a class with methods as a test suite. | |
#define | MOCKPP_CXXTEST(classname, meth) |
Register a method as test. | |
#define | MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CXXTEST_NS::TestSuite |
Contains a code fragment to create a test suite that contains one or more test cases which are arranged as class methods. | |
#define | MOCKPP_TESTMETHOD_DECL |
Depending on the test framework the test methods are regular class methods or rather static to react like free functions. |
Mockpp as no test framework of its own.
For that reason there is support for various existing test frameworks.
#define MOCKPP_CXXTEST | ( | classname, | |||
meth | ) |
static class TestDescription_ ## classname ## _ ## meth \ : public CXXTEST_NS::RealTestDescription { \ public: \ TestDescription_ ## classname ## _ ## meth() \ : CXXTEST_NS::RealTestDescription( tests_ ## classname, \ suiteDescription_ ##classname, \ __LINE__, \ #meth ) \ {} \ \ void runTest() \ { \ suite_ ## classname . meth(); \ } \ } testDescription_ ## classname ## _ ## meth
Register a method as test.
classname | name of the class | |
meth | name of the method |
Definition at line 59 of file CxxTestSupport.h.
#define MOCKPP_CXXTEST_SUITE_REGISTRATION | ( | classname | ) |
static classname suite_ ## classname; \ \ static CXXTEST_NS::List tests_ ## classname = { 0, 0 }; \ \ CXXTEST_NS::StaticSuiteDescription suiteDescription_ ## classname( __FILE__, \ __LINE__, \ #classname, \ suite_ ## classname, \ tests_ ## classname)
Register a class with methods as a test suite.
classname | name of the class |
Definition at line 40 of file CxxTestSupport.h.
#define MOCKPP_DERIVE_PUBLIC_UNITFRAMEWORK : public CXXTEST_NS::TestSuite |
Contains a code fragment to create a test suite that contains one or more test cases which are arranged as class methods.
This is done by publicly deriving from an according class of the test framework. For frameworks that don't support this, the macro is empty.
Definition at line 79 of file SelectUnittestFramework.h.
#define MOCKPP_TESTMETHOD_DECL |
Depending on the test framework the test methods are regular class methods or rather static to react like free functions.
So this macro is used to declare the methods accordingly.
Definition at line 81 of file SelectUnittestFramework.h.