From 7b275e0c2804598f00ed83b4b33474e9e1cf2d88 Mon Sep 17 00:00:00 2001 From: Sabina Grisi Date: Fri, 9 Feb 2024 23:07:00 +0100 Subject: [PATCH] Unittest switchPlayer_10_to_11 --- src/TicTacToe.h | 2 ++ test/test_tictactoe.c | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 test/test_tictactoe.c diff --git a/src/TicTacToe.h b/src/TicTacToe.h index 64933e5..d7a57e0 100644 --- a/src/TicTacToe.h +++ b/src/TicTacToe.h @@ -1,4 +1,6 @@ #ifndef TICTACTOE_H #define TICTACTOE_H +int switchPlayer(int currentPlayer); + #endif // TICTACTOE_H \ No newline at end of file diff --git a/test/test_tictactoe.c b/test/test_tictactoe.c new file mode 100644 index 0000000..17dc2a5 --- /dev/null +++ b/test/test_tictactoe.c @@ -0,0 +1,19 @@ +#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); +} + +#endif // TEST \ No newline at end of file