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.

48 lines
651 B

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