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, 10, difficultyBands[0]);
CuAssertIntEquals(tc, 21, difficultyBands[1]);
CuAssertIntEquals(tc, 44, difficultyBands[2]);
}
void TestBuildHitPointRanges(CuTest *tc) {
buildHitPointRages();
CuAssertIntEquals(tc, 1, hitPointRanges[0][0]);
CuAssertIntEquals(tc, 1, hitPointRanges[1][0]);
CuAssertIntEquals(tc, 2, hitPointRanges[2][0]);
CuAssertIntEquals(tc, 1, hitPointRanges[2][3]);
}
CuSuite *ConstGetSuite() {
CuSuite *suite = CuSuiteNew();
SUITE_ADD_TEST(suite, TestBuildDifficultyBands);
SUITE_ADD_TEST(suite, TestBuildHitPointRanges);
return suite;
}