|
@ -61,6 +61,13 @@ void test_getd_WithMin(void) { |
|
|
TEST_ASSERT_EQUAL_INT64(10000000, getd("", &min, NULL)); |
|
|
TEST_ASSERT_EQUAL_INT64(10000000, getd("", &min, NULL)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void test_getd_WithMax(void) { |
|
|
|
|
|
int max = 1000; |
|
|
|
|
|
char *input[] = {"sdf", "4000", "10000000", "-200", NULL}; |
|
|
|
|
|
fakeInput = input; |
|
|
|
|
|
TEST_ASSERT_EQUAL_INT64(-200, getd("", NULL, &max)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
void test_getld_WithMinAndMax(void) { |
|
|
void test_getld_WithMinAndMax(void) { |
|
|
long min = -100; |
|
|
long min = -100; |
|
|
long max = 100000000; |
|
|
long max = 100000000; |
|
|