Browse Source

Test

remotes/origin/Ariana
fdai7775 11 months ago
parent
commit
a669bdab52
  1. 13
      test/test_tictactoe.c

13
test/test_tictactoe.c

@ -53,11 +53,13 @@ void test_checkWinner_vertikalerGewinner(void) {
char result;
// Setze die Daten für einen vertikalen Gewinne
displayBoard();
makeMove(1);
makeMove(2);
makeMove(4);
makeMove(3);
makeMove(7);
displayBoard();
/* handeln */
result = checkWinner();
@ -65,17 +67,18 @@ void test_checkWinner_vertikalerGewinner(void) {
/* überprüfen */
TEST_ASSERT_EQUAL_CHAR('O', result);
reset_board();
displayBoard();
}
void test_checkWinner_horizontalerGewinner(void) {
/* arrangieren */
char result;
makeMove(1);
makeMove(4);
makeMove(2);
makeMove(5);
makeMove(3);
//makeMove(1);
//makeMove(4);
//makeMove(2);
//makeMove(5);
//makeMove(3);
/* handeln */
result = checkWinner();

Loading…
Cancel
Save