From 9fbe4606e1ee72998326daf4232c2d541d8368da Mon Sep 17 00:00:00 2001 From: Laurin Date: Fri, 2 Feb 2024 15:12:23 +0100 Subject: [PATCH] added test for converting small int to hex string --- test/conversionOfNumbers/test_conversionOfNumbers.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/conversionOfNumbers/test_conversionOfNumbers.c b/test/conversionOfNumbers/test_conversionOfNumbers.c index c3f6ffe..4ab94ea 100644 --- a/test/conversionOfNumbers/test_conversionOfNumbers.c +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -114,4 +114,17 @@ void test_convertBinaryStr1001ToInt9(){ //assert TEST_ASSERT_EQUAL_UINT(expected, result); +} + +void test_convert3ToHexStr3(){ + //arrange + char* result; + char expected[] = "3"; + + //act + result = convertIntToHex(3); + + //assert + TEST_ASSERT_EQUAL_STRING(expected, result); + free(result); } \ No newline at end of file