Running tests with decision functions using ITestMultiplexer IMulTest is a subclass of ITestMultiplexer. There are three decision functions, appleFunction, bearFunction, and cartFunction. Each of these functions tests the different aspects of the target class (although they just return true in this example). Decision functions should accept no parameter and should return bool. IMulTest reports PASS when all the three functions return true.
class IMulTest: public ITestMultiplexer {
public:
IMulTest();
~IMulTest();
void loadDecisions();
bool appleFunction();
bool bearFunction();
bool cartFunction();
};
IMulTest::IMulTest() {}
IMulTest::~IMulTest() {}
void IMulTest::loadDecisions()
{
addDecision("apple",( ITestDecisionFn)appleFunction);
addDecision("bear", (ITestDecisionFn)bearFunction);
addDecision("cart", (ITestDecisionFn)cartFunction);
}
bool IMulTest::appleFunction() { return true;}
bool IMulTest::bearFunction() {return true;}
bool IMulTest::cartFunction() {return true;}
runTestImplementationMacro(IMulTest);