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

39 lines
810 B
C
Raw Normal View History

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