Browse Source

Merge branch 'userinput'

master
TheUltimateOptimist 11 months ago
parent
commit
57ce9c38c2
  1. 7
      test/test_userinput.c

7
test/test_userinput.c

@ -46,6 +46,13 @@ void test_usergethd_WithMinAndMax(void) {
TEST_ASSERT_EQUAL_INT(50, usergethd("", &min, &max)); TEST_ASSERT_EQUAL_INT(50, usergethd("", &min, &max));
} }
void test_usergethd_WithMin(void) {
short min = 13;
char *input[] = {"sdf", "1", "100000", "6000", NULL};
fakeInput = input;
TEST_ASSERT_EQUAL_INT(6000, usergethd("", &min, NULL));
}
void test_usergetd_WithMinAndMax(void) { void test_usergetd_WithMinAndMax(void) {
int min = 10; int min = 10;
int max = 100000; int max = 100000;

Loading…
Cancel
Save