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
593 B

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