Context used when creating test suite in HelperMacros.
More...
#include <TestSuiteBuilderContext.h>
Context used when creating test suite in HelperMacros.
Base class for all context used when creating test suite. The actual context type during test suite creation is TestSuiteBuilderContext.
- See also
- CPPUNIT_TEST_SUITE, CPPUNIT_TEST_SUITE_ADD_TEST, CPPUNIT_TEST_SUITE_ADD_CUSTOM_TESTS.
◆ Properties
◆ Property
◆ TestSuiteBuilderContextBase() [1/3]
◆ ~TestSuiteBuilderContextBase()
TestSuiteBuilderContextBase::~TestSuiteBuilderContextBase |
( |
| ) |
|
|
virtual |
◆ TestSuiteBuilderContextBase() [2/3]
◆ TestSuiteBuilderContextBase() [3/3]
◆ addProperty()
void TestSuiteBuilderContextBase::addProperty |
( |
const std::string & |
key, |
|
|
const std::string & |
value |
|
) |
| |
Adds property pair.
- Parameters
-
key | PropertyKey string to add. |
value | PropertyValue string to add. |
◆ addTest()
void TestSuiteBuilderContextBase::addTest |
( |
Test * |
test | ) |
|
Adds a test to the fixture suite.
- Parameters
-
test | Test to add to the fixture suite. Must not be NULL . |
◆ getFixtureName()
std::string TestSuiteBuilderContextBase::getFixtureName |
( |
| ) |
const |
Returns the fixture name.
- Returns
- Fixture name. It is the name used to name the fixture suite.
◆ getStringProperty()
const std::string TestSuiteBuilderContextBase::getStringProperty |
( |
const std::string & |
key | ) |
const |
Returns property value assigned to param key.
- Parameters
-
◆ getTestNameFor() [1/2]
std::string TestSuiteBuilderContextBase::getTestNameFor |
( |
const std::string & |
testMethodName | ) |
const |
Returns the name of the test for the specified method.
- Parameters
-
testMethodName | Name of the method that implements a test. |
- Returns
- A string that is the concatenation of the test fixture name (returned by getFixtureName()) andtestMethodName, separated using '::'. This provides a fairly unique name for a given test.
◆ getTestNameFor() [2/2]
template<typename T >
std::string TestSuiteBuilderContextBase::getTestNameFor |
( |
const std::string & |
testMethodName, |
|
|
const T & |
value |
|
) |
| const |
|
inline |
Returns the name of the test for the specified method with the corresponding parameter.
- Parameters
-
testMethodName | Name (including a parameter) of the method that implements a test. |
- Returns
- A string that is the concatenation of the test fixture name (returned by getFixtureName()), testMethodName, separated using '::' and the parameter. This provides a fairly unique name for a given test. The parameter must be convertable to std::string through operator<< or a specialization of CPPUNIT_NS::StringHelper::toString needs to exist.
◆ makeTestFixture()
TestFixture * TestSuiteBuilderContextBase::makeTestFixture |
( |
| ) |
const |
|
protected |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ m_factory
◆ m_namer
const TestNamer& TestSuiteBuilderContextBase::m_namer |
|
protected |
◆ m_properties
Properties TestSuiteBuilderContextBase::m_properties |
|
private |
◆ m_suite
TestSuite& TestSuiteBuilderContextBase::m_suite |
|
protected |
The documentation for this class was generated from the following files: