本文整理汇总了C++中TestSuite类的典型用法代码示例。如果您正苦于以下问题:C++ TestSuite类的具体用法?C++ TestSuite怎么用?C++ TestSuite使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TestSuite类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
}
开发者ID:jmnavarro,项目名称:Cliente_SMTP_MAPI,代码行数:27,代码来源:ArchivoAdjuntoTest.cpp
示例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;
}
开发者ID:codersship,项目名称:inz,代码行数:7,代码来源:nelderMead_test.cpp
示例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;
}
开发者ID:kaorun55,项目名称:CppUnitxHelper,代码行数:7,代码来源:Tester.cpp
示例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++;
}
}
开发者ID:Notalib,项目名称:MrsWatson,代码行数:35,代码来源:TestRunner.c
示例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");
}
开发者ID:Azurami,项目名称:wagic,代码行数:26,代码来源:TestSuiteAI.cpp
示例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;
}
开发者ID:LuaDist,项目名称:wxwidgets,代码行数:27,代码来源:bstream.cpp
示例7: TestSuite
Test *QueryTestCase::suite ()
{
TestSuite *testSuite = new TestSuite ("QueryTestCase");
testSuite->addTest (makeTestCaller("testSimpleQuery", &QueryTestCase::testSimpleQuery));
testSuite->addTest (makeTestCaller("testSimpleSelectiveIterator", &QueryTestCase::testSimpleSelectiveIterator));
return testSuite;
}
开发者ID:defbobo,项目名称:python-patterns-examples,代码行数:8,代码来源:QueryTestCase.cpp
示例8: TestSuite
Test*
PCXTests::suite() {
typedef TestCaller<PCXTests> Caller;
TestSuite* suite = new TestSuite();
suite->addTest(new Caller("Test PCX Loader", &PCXTests::testLoader));
return suite;
}
开发者ID:marcclintdion,项目名称:iOS_WIN3,代码行数:8,代码来源:PCXTests.cpp
示例9: TestSuite
Test*
BMPTests::suite() {
typedef TestCaller<BMPTests> Caller;
TestSuite* suite = new TestSuite();
suite->addTest(new Caller("Test BMP Loader", &BMPTests::testLoader));
return suite;
}
开发者ID:casallas,项目名称:corona,代码行数:8,代码来源:BMPTests.cpp
示例10: Taggle_test_suite
TestSuite* Taggle_test_suite()
{
TestSuite *suiteOfTests = new TestSuite;
suiteOfTests->addTest(new TestCaller<TaggleTest>("senseTest", &TaggleTest::senseTest));
return suiteOfTests;
} // TaggleTest_suite
开发者ID:Wassasin,项目名称:arabica,代码行数:8,代码来源:test_Taggle.hpp
示例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;
}
开发者ID:kaorun55,项目名称:CppUnitxHelper,代码行数:8,代码来源:TestSetupTest.cpp
示例12: TestSuite
Test* TarjetaCAPIeTTest::suite()
{
TestSuite *suite = new TestSuite("eToken con CryptoAPI");
suite->addTest( new TarjetaCAPIeTTestCaller("PedirPIN", &TarjetaCAPIeTTest::testPedirPIN) );
return (suite);
}
开发者ID:jmnavarro,项目名称:PKI_Cryptocard_Engine,代码行数:8,代码来源:TarjetaCAPIeTTest.cpp
示例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;
}
开发者ID:fmoule,项目名称:cacao,代码行数:8,代码来源:StringTest.cpp
示例14: GraphicsDefsTestSuite
Test *
GraphicsDefsTestSuite()
{
TestSuite *testSuite = new TestSuite();
testSuite->addTest(new ConstantsTest("Constants"));
return testSuite;
}
开发者ID:mmanley,项目名称:Antares,代码行数:9,代码来源:GraphicsDefsTest.cpp
示例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;
}
开发者ID:marcclintdion,项目名称:iOS_WIN3,代码行数:9,代码来源:PNGTests.cpp
示例16: TestSuite
Test* GlobalsTest::getTestSuite()
{
TestSuite* s = new TestSuite();
s->addTest(new TestCaller<GlobalsTest>("testing XML escaping",
&GlobalsTest::escape));
s->addTest(new TestCaller<GlobalsTest>("testing XML unescape",
&GlobalsTest::unescape));
return s;
}
开发者ID:Konnekt,项目名称:lib-jabberoo,代码行数:9,代码来源:GlobalsTest.cpp
示例17: TestSuite
Test* multiplyTest::suite()
{
TestSuite *suiteOfTests = new TestSuite( "multiplyTest" );
suiteOfTests->addTest(new TestCaller<multiplyTest>("testMultiply", &multiplyTest::testMultiply));
suiteOfTests->addTest(new TestCaller<multiplyTest>("testRefMultiply", &multiplyTest::testRefMultiply));
suiteOfTests->addTest(new TestCaller<multiplyTest>("testValarrayMultiply", &multiplyTest::testValarrayMultiply));
return suiteOfTests;
}
开发者ID:ernstae,项目名称:sysforpopkinetics,代码行数:9,代码来源:multiplyTest.cpp
示例18: TestSuite
Test* IndOutputDataPackageTest::suite()
{
TestSuite *suiteOfTests = new TestSuite( "IndOutputDataPackageTest" );
// Test cases for this unit test.
suiteOfTests->addTest( new TestCaller<IndOutputDataPackageTest>( "equalCase", &IndOutputDataPackageTest::equalCase ) );
return suiteOfTests;
}
开发者ID:ernstae,项目名称:sysforpopkinetics,代码行数:9,代码来源:IndOutputDataPackageTest.cpp
示例19: TestSuite
Test*
JPEGTests::suite() {
typedef TestCaller<JPEGTests> Caller;
TestSuite* suite = new TestSuite();
suite->addTest(new Caller("JPEG Loader", &JPEGTests::testLoader));
suite->addTest(new Caller("Incomplete JPEG", &JPEGTests::testIncomplete));
return suite;
}
开发者ID:marcclintdion,项目名称:iOS_WIN3,代码行数:9,代码来源:JPEGTests.cpp
示例20: TestAngle
Test *TestAngle::suite()
{
TestSuite *testsuite = new TestSuite;
testsuite->addTest(new TestAngle ());
testsuite->addTest(new TestAngleClass<Radian> ());
testsuite->addTest(new TestAngleClass<Degree> ());
testsuite->addTest(new TestAngleClass<Hour> ());
return testsuite;
}
开发者ID:Abhishekpatil,项目名称:SonATA,代码行数:9,代码来源:testAngle.cpp
注:本文中的TestSuite类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论