From 97163c8cce683077ea3ffd0dc29e23c0daf1a0d1 Mon Sep 17 00:00:00 2001 From: Sophia Weber Date: Sun, 28 Jan 2024 13:50:42 +0100 Subject: [PATCH] add no formular detected Test for getNumber Function --- test/test_inputHandling.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/test_inputHandling.c b/test/test_inputHandling.c index 75c5725..7ac418d 100644 --- a/test/test_inputHandling.c +++ b/test/test_inputHandling.c @@ -7,9 +7,11 @@ char halloWelt[]="Hallo Welt"; char halloWelt2[]="Hallo Welt"; char halloWelt3[]="Ha llo W el t "; char halloWelt4[]="Ha\n\nllo \r W el\r\r t "; +calc_op formula = {0}; void setUp(void) { + formula.functionsType = opNotSupported; } void tearDown(void) @@ -85,4 +87,10 @@ void test_inputHandling_findEmptyFunctionType(void) TEST_ASSERT_TRUE(opEmpty == type); } +void test_inputHandling_getNumbersNoFormular(void) +{ + char* pnt = NULL; + pnt = getNumbers(halloWelt, 10, &formula); + TEST_ASSERT_NULL(pnt); +} #endif // TEST