Browse Source

added test for getlu with min and max

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

8
test/test_userinput.c

@ -62,3 +62,11 @@ void test_getu_WithMinAndMax(void) {
fakeInput = input;
TEST_ASSERT_EQUAL_UINT64(1167, getu("", &min, &max));
}
void test_getlu_WithMinAndMax(void) {
unsigned long min = 100;
unsigned long max = 100000000;
char *input[] = {"sdf", "-400", "10000000000000", "11001100", NULL};
fakeInput = input;
TEST_ASSERT_EQUAL_UINT64(11001100, getlu("", &min, &max));
}
Loading…
Cancel
Save