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
26 lines
483 B
#ifdef TEST
|
|
#include "unity.h"
|
|
#include "Schachbrett.h"
|
|
|
|
void setUp(void) {
|
|
}
|
|
|
|
void tearDown(void) {
|
|
}
|
|
|
|
void test_Schachbrett_erstellen(void) {
|
|
char** brett = Schachbrett_erstellen();
|
|
|
|
TEST_ASSERT_NOT_NULL(brett);
|
|
|
|
// Testen von ein Paar Positionen
|
|
TEST_ASSERT_EQUAL('R', brett[0][0]);
|
|
TEST_ASSERT_EQUAL('p', brett[6][0]);
|
|
TEST_ASSERT_EQUAL(' ', brett[4][4]);
|
|
|
|
for (int i = 0; i < 8; i++) {
|
|
free(brett[i]);
|
|
}
|
|
free(brett);
|
|
}
|
|
#endif // TEST
|