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.

43 lines
785 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include "Schachbrett.h"
  4. #include "Spieler.h"
  5. #include "Bauer.h"
  6. #include "Turm.h"
  7. #include "Laeufer.h"
  8. #include "Dame.h"
  9. #include "Springer.h"
  10. #include "Koenig.h"
  11. #include "Moving.h"
  12. #include "SimpleKI.h"
  13. #include "En_Passaut.h"
  14. #include "Bauernumwandlung.h"
  15. #include <stdlib.h>
  16. void test_KI_Bewegung (void) {
  17. char** brett = Schachbrett_erstellen();
  18. char** ver_brett = Schachbrett_erstellen();
  19. int startX = 1;
  20. int startY = 1;
  21. int endX = 2;
  22. int endY = 1;
  23. Player player = PLAYER_BLACK;
  24. TEST_ASSERT_NOT_NULL(brett);
  25. kuenstliche_intelligenz(brett, player);
  26. TEST_ASSERT_FALSE(brett == ver_brett);
  27. for (int i = 0; i < 8; i++) {
  28. free(brett[i]);
  29. }
  30. free(brett);
  31. }
  32. #endif // TEST