|
@ -0,0 +1,21 @@ |
|
|
|
|
|
// test_duellist-spielesammlun-projekt.h |
|
|
|
|
|
#ifdef TEST |
|
|
|
|
|
#include "unity.h" |
|
|
|
|
|
#include "duellist-spielesammlung-projekt.h" |
|
|
|
|
|
|
|
|
|
|
|
void setUp(void) {} |
|
|
|
|
|
|
|
|
|
|
|
void tearDown(void) {} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void test_coinflip_player_x_starts(void) { |
|
|
|
|
|
// Arrange |
|
|
|
|
|
TicTacToeGame game; |
|
|
|
|
|
|
|
|
|
|
|
// Act |
|
|
|
|
|
GameResult result = initializeGame(&game); |
|
|
|
|
|
|
|
|
|
|
|
// Assert |
|
|
|
|
|
TEST_ASSERT_EQUAL(SUCCESS, result); |
|
|
|
|
|
TEST_ASSERT_TRUE(game.currentPlayer == PLAYER_X || game.currentPlayer == PLAYER_O); |
|
|
|
|
|
} |