|
@ -18,7 +18,15 @@ void test_gets_WithMinLengthAndMaxLength(void) { |
|
|
void test_gethd_WithMinAndMax(void) { |
|
|
void test_gethd_WithMinAndMax(void) { |
|
|
short min = 10; |
|
|
short min = 10; |
|
|
short max = 100; |
|
|
short max = 100; |
|
|
char *input[] = {"sdf", "1", "101", "50"}; |
|
|
|
|
|
|
|
|
char *input[] = {"sdf", "1", "101", "50", NULL}; |
|
|
fakeInput = input; |
|
|
fakeInput = input; |
|
|
TEST_ASSERT_EQUAL_INT64(50, gethd("", &min, &max)); |
|
|
TEST_ASSERT_EQUAL_INT64(50, gethd("", &min, &max)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_getd_WithMinAndMax(void) { |
|
|
|
|
|
int min = 10; |
|
|
|
|
|
int max = 100000; |
|
|
|
|
|
char *input[] = {"sdf", "4", "10000000", "1167", NULL}; |
|
|
|
|
|
fakeInput = input; |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT64(1167, getd("", &min, &max)); |
|
|
} |
|
|
} |