Browse Source

Dame test schlag, Emman Mensdorf

remotes/origin/Läufer-fertig,-Hendrik-Voß
Emman Mensdorf 11 months ago
parent
commit
e5222db6af
  1. 25
      test/test_Dame.c

25
test/test_Dame.c

@ -5,6 +5,31 @@
#include "Dame.h" #include "Dame.h"
#include <stdlib.h> #include <stdlib.h>
void test_Dame_Schlag_Bewegung(void) {
char** brett = Schachbrett_erstellen();
int startX = 0;
int startY = 3;
int endX = 3;
int endY = 6;
Player player = PLAYER_WHITE;
TEST_ASSERT_NOT_NULL(brett);
brett[3][0] = 'Q';
print_Schachfeld(brett);
TEST_ASSERT_TRUE(istzugerlaubt_Dame(brett, startX, startY, endX, endY, player));
for (int i = 0; i < 8; i++) {
free(brett[i]);
}
free(brett);
}
void test_Dame_negative_horizontal_Bewegung(void) { void test_Dame_negative_horizontal_Bewegung(void) {
char** brett = Schachbrett_erstellen(); char** brett = Schachbrett_erstellen();

Loading…
Cancel
Save