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.

33 lines
583 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "Schachbrett.h"
  4. #include "Spieler.h"
  5. #include "Dame.h"
  6. #include <stdlib.h>
  7. void test_Dame_Falsche_Bewegung(void) {
  8. char** brett = Schachbrett_erstellen();
  9. int startX = 3;
  10. int startY = 0;
  11. int endX = 3;
  12. int endY = 4;
  13. Player player = PLAYER_WHITE;
  14. TEST_ASSERT_NOT_NULL(brett);
  15. print_Schachfeld(brett);
  16. TEST_ASSERT_FALSE(istzugerlaubt_Dame( brett, startX, startY, endX, endY, player));
  17. for (int i = 0; i < 8; i++) {
  18. free(brett[i]);
  19. }
  20. free(brett);
  21. }
  22. #endif // TEST