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.
44 lines
786 B
44 lines
786 B
#ifdef TEST
|
|
#include "unity.h"
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <stdbool.h>
|
|
#include "Spieler.h"
|
|
#include "Schachbrett.h"
|
|
#include "Laeufer.h"
|
|
#include "Spielstatus.h"
|
|
|
|
void setUp(void) {
|
|
}
|
|
|
|
void tearDown(void) {
|
|
}
|
|
void test_Lauefer_diagonal_Bewegung(void) {
|
|
|
|
char** brett = Schachbrett_erstellen();
|
|
int startX = 3;
|
|
int startY = 3;
|
|
int endX = 5;
|
|
int endY = 5;
|
|
Player player = PLAYER_WHITE;
|
|
|
|
|
|
TEST_ASSERT_NOT_NULL(brett);
|
|
|
|
|
|
TEST_ASSERT_FALSE(istzugerlaubt_Laeufer( brett, startX, startY, endX, endY, player));
|
|
|
|
|
|
for (int i = 0; i < 8; i++) {
|
|
free(brett[i]);
|
|
}
|
|
free(brett);
|
|
}
|
|
// Tests Läufer
|
|
// Testen, ob die Bewegung wirklich nur diagonal ist
|
|
// Ob eine Spielfigur die Bewegung blockiert
|
|
|
|
|
|
|
|
|
|
#endif // TEST
|