int main () { Shape * circle = new Circle; Shape * rectangle = new Rectangle; Simple simple; Fancy fancy; assert ( testDraw ( &simple.drawer, circle ) == SimpleCircleDrawer ); assert ( testDraw ( &fancy.drawer, rectangle ) == FancyiRactangleDrawer ); assert ( testCalculate( &fancy.calculate, circle ) == FancyCircleCalculate ); assert ( testCalculate( &simple.calculate, rectangle ) == SimpleRectangleCalculate ); }
int main() { int i; int seed = 1000; int numPlayers = 2; int player = 0; int *deckZero,*deckOne; struct gameState preTest, postTest; int k[10] = {adventurer, council_room, feast, gardens, mine ,remodel, smithy, village, baron, great_hall}; /* Test Specification Variables */ int drawCountTestZero = 3; int drawCountTestOne = 0; initializeGame(numPlayers,k,seed,&postTest); printf("\n\nBeginning Test for Village...\n\n"); memcpy(&preTest,&postTest,sizeof(struct gameState)); insertCard(&postTest,player); playCard((postTest.handCount[player]-1),0,0,0,&postTest); testDraw(&preTest,&postTest,player); testHand(&preTest,&postTest,player); testDiscard(&preTest,&postTest,player); testSupply(&preTest,&postTest); testPlayed(&preTest,&postTest); testUtility(&preTest,&postTest); printf("\n\tTesting finished\n\n"); }
int TestLauncher::exec() { if (mTest == "1" || mTest == "2" || mTest == "3" || mTest == "19") return testBackend(); else if (mTest == "4") return testSound(); else if (mTest == "5" || mTest == "6" || mTest == "7" || mTest == "18") return testRescale(); else if (mTest == "8" || mTest == "9" || mTest == "10" || mTest == "17") return testFps(); else if (mTest == "11") return testBatches(); else if (mTest == "14" || mTest == "15" || mTest == "16" || mTest == "20") return testTextures(); else if (mTest == "99") return testVideoDetection(); else if (mTest == "100") return testInternal(); else if (mTest == "101") return testDye(); else if (mTest == "102") return testDraw(); else if (mTest == "103") return testFps2(); else if (mTest == "104") return testFps3(); else if (mTest == "105") return testDyeSpeed(); else if (mTest == "106") return testStackSpeed(); return -1; }
int main() { App::Get(); while (App::Get().isOpen()) { setEnemy(); App::Get().begin(); testDraw(); App::Get().end(); } }