From e66354b1940b197491ed2808a3c4df5a03dc30ca Mon Sep 17 00:00:00 2001 From: Eric Bagus Date: Thu, 8 Feb 2024 23:04:04 +0100 Subject: [PATCH] Added test for operation handler extracting method --- test/test_operationHandler.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/test_operationHandler.c b/test/test_operationHandler.c index 1cdfb1d..cadef23 100644 --- a/test/test_operationHandler.c +++ b/test/test_operationHandler.c @@ -46,4 +46,11 @@ void test_operationHandler_extractingFirstNumber(void) { char str[] = {'4', '8', ' ', '5', '\0'}; int result = extractFirstNumber(str); TEST_ASSERT_EQUAL_INT(expectedResult, result); -} \ No newline at end of file +} + +void test_operationHandler_removefirstnumberfromoriginalstring(void) { + char expected[] = {'5', '\0'}; + char str[] = {'4', '8', ' ', '5', '\0'}; + extractFirstNumber(str); + TEST_ASSERT_EQUAL_STRING(expected, str); +}