Performing Protocol Tests With createComparisonTest and createStreamTest

The global functions createComparisonTest and createStreamTest are useful if you want to create instances of IComparisonTestOf or IStreamTestOf and run those tests under ITestCollection using ITestCollection::adoptMethod.

class IProtocolTest : public ITestCollection{
public:
	IProtocolTest();
	~IProtocolTest();
	virtual void setupSubtests();
};
IProtocolTest::IProtocolTest() {}
IProtocolTest::~IProtocolTest() {}
void IProtocolTest::setupSubtests()
{
	adoptTest(createComparisonTest(new IMyTest(1), new IMyTest(2)));
	adoptTest(createStreamTest(new IMyTest(1)));
	adoptTest(createComparisonTest(new IMyTest2MyTest2("abc"), new IMyTest2("xyz")));
	adoptTest(createStreamTest(new IMyTest2("def")));
}

runTestImplementationMacro(IProtocolTest);