|
|
@ -105,4 +105,25 @@ void test_callCommandById_startGame(void){ |
|
|
|
|
|
|
|
// assert |
|
|
|
TEST_ASSERT_EQUAL_PTR( startGame, actualCommand ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_initializeBoard(void){ |
|
|
|
// arrange |
|
|
|
bool expectedBoard[3][3]={ |
|
|
|
{0,0,0}, |
|
|
|
{0,0,0}, |
|
|
|
{0,0,0} |
|
|
|
}; |
|
|
|
|
|
|
|
// act |
|
|
|
bool actualBoard[3][3]; |
|
|
|
initializeBoard(actualBoard); |
|
|
|
|
|
|
|
// assert |
|
|
|
for (size_t i = 0; i < 3; i++) { |
|
|
|
for (size_t ii = 0; ii < 3; ii++) { |
|
|
|
TEST_ASSERT_EQUAL_INT(expectedBoard[i][ii], actualBoard[i][ii]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |