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

29 lines
761 B
C

#include "cutest-1.5/CuTest.h"
#include "const.h"
#include <stdio.h>
void TestBuildDifficultyBands(CuTest *tc) {
buildDifficultyBands();
CuAssertIntEquals(tc, 20, difficultyBands[0]);
CuAssertIntEquals(tc, 41, difficultyBands[1]);
CuAssertIntEquals(tc, 3095, difficultyBands[MAX_DIFFICULTY - 1]);
}
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;
}