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

28 lines
741 B
C

#include "cutest-1.5/CuTest.h"
#include "const.h"
#include <stdio.h>
void TestBuildDifficultyBands(CuTest *tc) {
buildDifficultyBands();
CuAssertIntEquals(tc, 30, difficultyBands[0]);
CuAssertIntEquals(tc, 37, difficultyBands[1]);
CuAssertIntEquals(tc, 46, difficultyBands[2]);
}
void TestBuildHitPointRanges(CuTest *tc) {
buildHitPointRages();
CuAssertIntEquals(tc, 1, hitPointRanges[0][0]);
CuAssertIntEquals(tc, 1, hitPointRanges[1][0]);
CuAssertIntEquals(tc, 2, hitPointRanges[4][0]);
CuAssertIntEquals(tc, 1, hitPointRanges[4][3]);
}
CuSuite *ConstGetSuite() {
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, TestBuildDifficultyBands);
SUITE_ADD_TEST(suite, TestBuildHitPointRanges);
return suite;
}