CPPUNIT_NS::TestFixture を拡張する「 TT_Common」と「TT_Container 」という 2 つのテスト クラスがあります。
class TT_Common : public CPPUNIT_NS::TestFixture ......
class TT_Container : public CPPUNIT_NS::TestFixture ......
そして、CPPUNIT_NS::TestRunner を拡張する TT_Runner と呼ばれる別のクラス:
class TT_Runner : public CPPUNIT_NS::TestRunner
{
.....
void run( CPPUNIT_NS::TestResult &controller, const std::string &testPath )
{
CPPUNIT_NS::TestPath path = m_suite->resolveTestPath( testPath );
CPPUNIT_NS::Test *testToRun = path.getChildTest();
for ( size_t iIdx = 0; iIdx < testToRun->getChildTestCount(); iIdx++ )
{
CPPUNIT_NS::Test* psTest = testToRun->getChildTestAt(iIdx);
std::string testName = psTest->getName();
// testName is TT_Common for iIdx = 0 and TT_Container for iIdx = 1
}
}
私はすでに TestFixture の名前を持っていますが、そのインスタンスを作成するにはどうすればよいですか? 名前を取り、インスタンスを返すファクトリまたはレジストリが見つかりません。