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.

26 lines
483 B

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