From ae51080f2c05f67a4ab24e3f10b3226efa353f81 Mon Sep 17 00:00:00 2001 From: TheUltimateOptimist Date: Mon, 29 Jan 2024 02:40:39 +0100 Subject: [PATCH] added test for getd with min --- test/test_userinput.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/test_userinput.c b/test/test_userinput.c index 4965bab..b0d6bac 100644 --- a/test/test_userinput.c +++ b/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;