You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
663 B

#ifdef TEST
#include "unity.h"
#include <stdlib.h>
#include "Schachbrett.h"
#include "Bauer.h"
#include "Bauernumwandlung.h"
void setUp(void) {
}
void tearDown(void) {
}
void test_Bauernumwandlung_erlaubt(void) {
char** brett = Schachbrett_erstellen();
int startX = 6;
int startY = 6;
int endX = 6;
int endY = 7;
Player player = PLAYER_WHITE;
TEST_ASSERT_NOT_NULL(brett);
brett[6][6] = 'P';
brett[7][6] = ' ';
TEST_ASSERT_TRUE(ist_umwandlung_gerlaubt_Bauer( brett, startX, startY, endX, endY, player));
for (int i = 0; i < 8; i++) {
free(brett[i]);
}
free(brett);
}
#endif // TEST