Browse Source

added test for gethu with min and max

remotes/origin/userinput
TheUltimateOptimist 11 months ago
parent
commit
a81e8d3d3c
  1. 8
      test/test_userinput.c

8
test/test_userinput.c

@ -46,3 +46,11 @@ void test_getlld_WithMinAndMax(void) {
fakeInput = input; fakeInput = input;
TEST_ASSERT_EQUAL_INT64(11001100, getlld("", &min, &max)); TEST_ASSERT_EQUAL_INT64(11001100, getlld("", &min, &max));
} }
void test_gethu_WithMinAndMax(void) {
unsigned short min = 10;
unsigned short max = 100;
char *input[] = {"sdf", "-1", "1", "101", "50", NULL};
fakeInput = input;
TEST_ASSERT_EQUAL_INT64(50, gethu("", &min, &max));
}
Loading…
Cancel
Save