Browse Source

added test for getld with min and max

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

8
test/test_userinput.c

@ -30,3 +30,11 @@ void test_getd_WithMinAndMax(void) {
fakeInput = input;
TEST_ASSERT_EQUAL_INT64(1167, getd("", &min, &max));
}
void test_getld_WithMinAndMax(void) {
long min = -100;
long max = 100000000;
char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL};
fakeInput = input;
TEST_ASSERT_EQUAL_INT64(11001100, getld("", &min, &max));
}
Loading…
Cancel
Save