int main(int argc, char **argv) { SelectStream(2); PutSeed(time(NULL)); if(argc < 2) { printf("Usage: unittest1 <number times to run>\n"); return 1; } int i, failures = 0; struct gameState G; for(i = 0; i < atoi(argv[1]); i++) { failures += testShuffle(&G, i); } printf("Tests Run: %d, Tests passed: %d, Tests failed: %d\n", atoi(argv[1]), atoi(argv[1]) - failures, failures); return 0; }
int main() { int r; int seed = 1000; int numPlayer = 3; int p = 2; struct gameState G; int k[10] = {adventurer, council_room, feast, gardens, mine , remodel, smithy, village, tribute, embargo}; memset(&G, 23, sizeof(struct gameState)); // clear the game state r = initializeGame(numPlayer, k, seed, &G); // initialize a new game printf("TESTING shuffle():\n"); testShuffle(p, &G); printf("All tests passed!\n"); return 0; }
int main(int argc, char *argv[]) { testShuffle(); return 0; }
int main(){ testShuffle(); return 0; }