本文整理汇总了C++中TestSuite类的典型用法代码示例。如果您正苦于以下问题:C++ TestSuite类的具体用法?C++ TestSuite怎么用?C++ TestSuite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestSuite类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: void
Test *ArchivoAdjuntoTest::suite()
{
typedef struct _Entrada
{
char *nombre;
void (ArchivoAdjuntoTest::*metodo)();
} Entrada;
static Entrada pruebas[] =
{
{"testSize", &ArchivoAdjuntoTest::testSize},
{"testFilename", &ArchivoAdjuntoTest::testFilename},
{"testConstructorFilename", &ArchivoAdjuntoTest::testConstructorFilename},
{"testReadTextData", &ArchivoAdjuntoTest::testReadTextData},
{"testReadZeroTextData", &ArchivoAdjuntoTest::testReadZeroTextData},
{"testReadDataNoExiste", &ArchivoAdjuntoTest::testReadDataNoExiste},
{"testEncode", &ArchivoAdjuntoTest::testEncode}
};
int TotalEntradas = sizeof(pruebas)/sizeof(Entrada);
TestSuite *suite = new TestSuite("ArchivoAdjunto");
for (int i=0; i<TotalEntradas; i++)
suite->addTest( new ArchivoAdjuntoTestCaller(pruebas[i].nombre, pruebas[i].metodo) );
return suite;
}
示例2: suite
static Test* suite() {
TestSuite* testsSuite = new TestSuite("NelderMeadTest");
testsSuite->addTest(new TestCaller<NelderMeadTest>("creationTest", &NelderMeadTest::creationTest));
testsSuite->addTest(new TestCaller<NelderMeadTest>("calculateTest", &NelderMeadTest::calculateTest));
return testsSuite;
}
示例3: suite
static Test* suite()
{
TestSuite* suite = new TestSuite( "QuizTest");
suite->addTest( new TEST_CALLER( QuizTest, testQuestion));
suite->addTest( new TEST_CALLER( QuizTest, testAnswer));
return suite;
}
示例4: runTestCase
void runTestCase(void* item, void* extraData) {
TestCase testCase = (TestCase)item;
TestSuite testSuite = (TestSuite)extraData;
int result;
if(!testSuite->onlyPrintFailing) {
printTestName(testCase->name);
}
if(testCase->testCaseFunc != NULL) {
if(testSuite->setup != NULL) {
testSuite->setup();
}
result = testCase->testCaseFunc();
if(result == 0) {
if(!testSuite->onlyPrintFailing) {
printTestSuccess();
}
testSuite->numSuccess++;
}
else {
printTestFail();
testSuite->numFail++;
}
if(testSuite->teardown != NULL) {
testSuite->teardown();
}
}
else {
if(!testSuite->onlyPrintFailing) {
_printTestSkipped();
}
testSuite->numSkips++;
}
}
示例5: LOG
void TestSuite::ThreadProc(void* inParam)
{
LOG("Entering TestSuite::ThreadProc");
TestSuite* instance = reinterpret_cast<TestSuite*>(inParam);
if (instance)
{
string filename;
float counter = 1.0f;
while(instance->mProcessing && (filename = instance->getNextFile()) != "")
{
TestSuiteGame theGame(instance, filename);
if(theGame.isOK)
{
theGame.observer->loadTestSuitePlayer(0, &theGame);
theGame.observer->loadTestSuitePlayer(1, &theGame);
theGame.observer->startGame(theGame.gameType, /*instance->mRules*/Rules::getRulesByFilename("testsuite.txt"));
theGame.initGame();
while(!theGame.observer->didWin())
theGame.observer->Update(counter++);
}
}
}
LOG("Leaving TestSuite::ThreadProc");
}
示例6: GetlargeFileSuite
Test *StreamCase::suite()
{
TestSuite *suite = new StreamCase;
/*
* Register all sub stream test suites.
*/
STREAM_REGISTER_SUB_SUITE(memStream);
STREAM_REGISTER_SUB_SUITE(strStream);
STREAM_REGISTER_SUB_SUITE(fileStream);
STREAM_REGISTER_SUB_SUITE(ffileStream);
STREAM_REGISTER_SUB_SUITE(tempStream);
STREAM_REGISTER_SUB_SUITE(zlibStream);
STREAM_REGISTER_SUB_SUITE(backStream);
extern CppUnit::Test* GetlargeFileSuite();
Test *lfs = GetlargeFileSuite();
if (lfs)
suite->addTest(lfs);
/*
** Add more stream subtests here
*/
return suite;
}
示例7: TestSuite
Test *QueryTestCase::suite ()
{
TestSuite *testSuite = new TestSuite ("QueryTestCase");
testSuite->addTest (makeTestCaller("testSimpleQuery", &QueryTestCase::testSimpleQuery));
testSuite->addTest (makeTestCaller("testSimpleSelectiveIterator", &QueryTestCase::testSimpleSelectiveIterator));
return testSuite;
}
示例8: TestSuite
Test*
PCXTests::suite() {
typedef TestCaller<PCXTests> Caller;
TestSuite* suite = new TestSuite();
suite->addTest(new Caller("Test PCX Loader", &PCXTests::testLoader));
return suite;
}
示例9: TestSuite
Test*
BMPTests::suite() {
typedef TestCaller<BMPTests> Caller;
TestSuite* suite = new TestSuite();
suite->addTest(new Caller("Test BMP Loader", &BMPTests::testLoader));
return suite;
}
示例10: Taggle_test_suite
TestSuite* Taggle_test_suite()
{
TestSuite *suiteOfTests = new TestSuite;
suiteOfTests->addTest(new TestCaller<TaggleTest>("senseTest", &TaggleTest::senseTest));
return suiteOfTests;
} // TaggleTest_suite
示例11: TestSuite
Test* TestSetupTest::suite()
{
TestSuite* suite = new TestSuite("TestSetupTest");
suite->addTest(new TEST_CALLER(TestSetupTest, testTestSetup));
suite->addTest(new TEST_CALLER(TestSetupTest, testSetUpError));
suite->addTest(new TEST_CALLER(TestSetupTest, testTearDownError));
return suite;
}
示例12: TestSuite
Test* TarjetaCAPIeTTest::suite()
{
TestSuite *suite = new TestSuite("eToken con CryptoAPI");
suite->addTest( new TarjetaCAPIeTTestCaller("PedirPIN", &TarjetaCAPIeTTest::testPedirPIN) );
return (suite);
}
示例13: TestSuite
Test* StringTest::suite() {
TestSuite *suite = new TestSuite();
suite->addTest(new TestCaller<StringTest>("test_size", &StringTest::test_size));
suite->addTest(new TestCaller<StringTest>("test_affectation", &StringTest::test_affectation));
suite->addTest(new TestCaller<StringTest>("test_charAt", &StringTest::test_charAt));
suite->addTest(new TestCaller<StringTest>("test_equals", &StringTest::test_equals));
return suite;
}
示例14: GraphicsDefsTestSuite
Test *
GraphicsDefsTestSuite()
{
TestSuite *testSuite = new TestSuite();
testSuite->addTest(new ConstantsTest("Constants"));
return testSuite;
}
示例15: TestSuite
Test*
PNGTests::suite() {
typedef TestCaller<PNGTests> Caller;
TestSuite* suite = new TestSuite();
suite->addTest(new Caller("Test PNG Loader", &PNGTests::testLoader));
suite->addTest(new Caller("Test PNG Writer", &PNGTests::testWriter));
return suite;
}