Browse Source

added test for getd with min

remotes/origin/userinput
TheUltimateOptimist 11 months ago
parent
commit
ae51080f2c
  1. 7
      test/test_userinput.c

7
test/test_userinput.c

@ -54,6 +54,13 @@ void test_getd_WithMinAndMax(void) {
TEST_ASSERT_EQUAL_INT64(1167, getd("", &min, &max));
}
void test_getd_WithMin(void) {
int min = 10;
char *input[] = {"sdf", "4", "10000000", NULL};
fakeInput = input;
TEST_ASSERT_EQUAL_INT64(10000000, getd("", &min, NULL));
}
void test_getld_WithMinAndMax(void) {
long min = -100;
long max = 100000000;

Loading…
Cancel
Save