Browse Source

added test for gets with any length

remotes/origin/userinput
TheUltimateOptimist 11 months ago
parent
commit
6020649807
  1. 7
      test/test_userinput.c

7
test/test_userinput.c

@ -31,6 +31,13 @@ void test_gets_WithMax(void) {
TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual));
}
void test_gets_WithAnyLength(void) {
char *input[] = {"dfdfdfdf", NULL};
fakeInput = input;
char *actual = gets("", NULL, NULL);
TEST_ASSERT_EQUAL_CHAR_ARRAY("dfdfdfdf", actual, strlen(actual));
}
void test_gethd_WithMinAndMax(void) {
short min = 10;
short max = 100;

Loading…
Cancel
Save