|
@ -49,4 +49,16 @@ void test_initial_state(void){ |
|
|
|
|
|
|
|
|
// assert |
|
|
// assert |
|
|
TEST_ASSERT_EQUAL_INT( expectedState, newGame.currentState ); |
|
|
TEST_ASSERT_EQUAL_INT( expectedState, newGame.currentState ); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_userInput(void){ |
|
|
|
|
|
// arrange |
|
|
|
|
|
int expectedState = 1; |
|
|
|
|
|
char* input = "start game"; |
|
|
|
|
|
|
|
|
|
|
|
// act |
|
|
|
|
|
int actualState = handleState( input ); |
|
|
|
|
|
|
|
|
|
|
|
// assert |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT( expectedState, actualState ); |
|
|
} |
|
|
} |