|
|
@ -52,5 +52,13 @@ void test_gethu_WithMinAndMax(void) { |
|
|
|
unsigned short max = 100; |
|
|
|
char *input[] = {"sdf", "-1", "1", "101", "50", NULL}; |
|
|
|
fakeInput = input; |
|
|
|
TEST_ASSERT_EQUAL_INT64(50, gethu("", &min, &max)); |
|
|
|
TEST_ASSERT_EQUAL_UINT64(50, gethu("", &min, &max)); |
|
|
|
} |
|
|
|
|
|
|
|
void test_getu_WithMinAndMax(void) { |
|
|
|
unsigned int min = 10; |
|
|
|
unsigned int max = 100000; |
|
|
|
char *input[] = {"sdf", "4", "10000000", "1167", NULL}; |
|
|
|
fakeInput = input; |
|
|
|
TEST_ASSERT_EQUAL_UINT64(1167, getu("", &min, &max)); |
|
|
|
} |