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.
30 lines
605 B
30 lines
605 B
#ifdef TEST
|
|
|
|
#include "unity.h"
|
|
|
|
#include "TicTacToe.h"
|
|
|
|
void setUp(void)
|
|
{
|
|
}
|
|
|
|
void tearDown(void)
|
|
{
|
|
}
|
|
|
|
void test_switchPlayer_10_to_11(void) {
|
|
TEST_ASSERT(switchPlayer(10) == 11);
|
|
}
|
|
|
|
// Testfall für die Funktion checkForWin - Horizontaler Sieg
|
|
void test_CheckForWin_Horizontal_1_2_3(void) {
|
|
// Teste horizontalen Sieg in der ersten Zeile
|
|
TEST_ASSERT(checkForWin(10, 10, 10, 4, 5, 6, 7, 8, 9, 10) == 1);
|
|
}
|
|
|
|
void test_CheckForWin_Horizontal_4_5_6(void) {
|
|
// Teste horizontalen Sieg in der zweiten Zeile
|
|
TEST_ASSERT(checkForWin(1, 2, 3, 11, 11, 11, 7, 8, 9, 11) == 1);
|
|
}
|
|
|
|
#endif // TEST
|