Browse Source

invalid user Input

remotes/origin/ticTacToe
Aimee Reincke 2 years ago
parent
commit
ac8629e1f8
  1. 1
      src/c/ticTacToe.c
  2. 14
      test/c/test_ticTacToe.c

1
src/c/ticTacToe.c

@ -45,4 +45,5 @@ bool validateUserInput(int row, int col){
return true;
}
}
return false;
}

14
test/c/test_ticTacToe.c

@ -24,4 +24,18 @@ void test_ticTacToe_validUserInput(void)
TEST_ASSERT_EQUAL_INT(true, result);
}
void test_ticTacToe_invalidUserInput(void)
{
/* arrange */
bool result;
int row = 1, col = 3;
/* act */
result = validateUserInput(row, col);
/* assert */
TEST_ASSERT_EQUAL_INT(false, result);
}
#endif // TEST
Loading…
Cancel
Save