|
@ -15,6 +15,14 @@ void test_gets_WithMinLengthAndMaxLength(void) { |
|
|
TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual)); |
|
|
TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_gets_WithMin(void) { |
|
|
|
|
|
unsigned long minLength = 3; |
|
|
|
|
|
char *input[] = {"", "ei", "e", "dddd", NULL}; |
|
|
|
|
|
fakeInput = input; |
|
|
|
|
|
char *actual = gets("", &minLength, NULL); |
|
|
|
|
|
TEST_ASSERT_EQUAL_CHAR_ARRAY("dddd", actual, strlen(actual)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void test_gethd_WithMinAndMax(void) { |
|
|
void test_gethd_WithMinAndMax(void) { |
|
|
short min = 10; |
|
|
short min = 10; |
|
|
short max = 100; |
|
|
short max = 100; |
|
|