dos-vga-arena-shooter-game/test.c

39 lines
810 B
C

#include "const.h"
#include "cutest-1.5/CuTest.h"
#include <stdio.h>
CuSuite *SpawnGetSuite();
CuSuite *PowerupGetSuite();
CuSuite *CombatGetSuite();
CuSuite *ConstGetSuite();
CuSuite *MovementGetSuite();
void beforeAll() {
buildDifficultyBands();
buildHitPointRages();
}
int RunAllTests(void) {
CuString *output = CuStringNew();
CuSuite *suite = CuSuiteNew();
beforeAll();
CuSuiteAddSuite(suite, SpawnGetSuite());
CuSuiteAddSuite(suite, PowerupGetSuite());
CuSuiteAddSuite(suite, CombatGetSuite());
CuSuiteAddSuite(suite, ConstGetSuite());
CuSuiteAddSuite(suite, MovementGetSuite());
CuSuiteRun(suite);
CuSuiteSummary(suite, output);
CuSuiteDetails(suite, output);
printf("%s\n", output->buffer);
return suite->failCount > 0;
}
int main(void) {
return RunAllTests();
}