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.

27 lines
503 B

  1. #ifdef TEST
  2. #include "unity.h"
  3. #include <stdlib.h>
  4. #include "Schachbrett.h"
  5. void setUp(void) {
  6. }
  7. void tearDown(void) {
  8. }
  9. void test_Schachbrett_erstellen(void) {
  10. char** brett = Schachbrett_erstellen();
  11. TEST_ASSERT_NOT_NULL(brett);
  12. // Testen von ein Paar Positionen
  13. TEST_ASSERT_EQUAL('R', brett[0][0]);
  14. TEST_ASSERT_EQUAL('p', brett[6][0]);
  15. TEST_ASSERT_EQUAL(' ', brett[4][4]);
  16. for (int i = 0; i < 8; i++) {
  17. free(brett[i]);
  18. }
  19. free(brett);
  20. }
  21. #endif // TEST