Browse Source

refactoring: typo

remotes/origin/georg
KaffeeMaus 11 months ago
parent
commit
04e8045c7c
  1. 2
      src/main/c/Georg/tictactoe.c
  2. 2
      src/main/c/Georg/tictactoe.h
  3. 4
      src/test/c/Georg/test_tictactoe.c

2
src/main/c/Georg/tictactoe.c

@ -24,7 +24,7 @@ struct ticTacToe createTicTacToe() {
return newGame; return newGame;
} }
int handeCommand( char* input ){
int handleCommand( char* input ){
if( strcmp(input, "start menu") == 0 ){ if( strcmp(input, "start menu") == 0 ){
return 0; return 0;
}else if( strcmp(input, "start game") == 0 ){ }else if( strcmp(input, "start game") == 0 ){

2
src/main/c/Georg/tictactoe.h

@ -8,6 +8,6 @@ struct ticTacToe{
char* getWelcomeMessage(); char* getWelcomeMessage();
char* getRulesMessage(); char* getRulesMessage();
struct ticTacToe createTicTacToe(); struct ticTacToe createTicTacToe();
int handeCommand( char* input );
int handleCommand( char* input );
#endif //TICTACTOE_H #endif //TICTACTOE_H

4
src/test/c/Georg/test_tictactoe.c

@ -57,7 +57,7 @@ void test_command_startGame(void){
char* input = "start game"; char* input = "start game";
// act // act
int actualState = handeCommand( input );
int actualState = handleCommand( input );
// assert // assert
TEST_ASSERT_EQUAL_INT( expectedState, actualState ); TEST_ASSERT_EQUAL_INT( expectedState, actualState );
@ -69,7 +69,7 @@ void test_command_startMenu(void){
char* input = "start menu"; char* input = "start menu";
// act // act
int actualState = handeCommand( input );
int actualState = handleCommand( input );
// assert // assert
TEST_ASSERT_EQUAL_INT( expectedState, actualState ); TEST_ASSERT_EQUAL_INT( expectedState, actualState );
Loading…
Cancel
Save