|
@ -37,4 +37,16 @@ void test_rules_message(void){ |
|
|
|
|
|
|
|
|
// assert |
|
|
// assert |
|
|
TEST_ASSERT_EQUAL_STRING(expectedMessage, message); |
|
|
TEST_ASSERT_EQUAL_STRING(expectedMessage, message); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_initial_state(void){ |
|
|
|
|
|
// arrange |
|
|
|
|
|
struct ticTacToe newGame; |
|
|
|
|
|
int expectedState = 0; |
|
|
|
|
|
|
|
|
|
|
|
// act |
|
|
|
|
|
newGame = createTicTacToe(); |
|
|
|
|
|
|
|
|
|
|
|
// assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT( expectedState, newGame.currentState ); |
|
|
} |
|
|
} |