From 943f911a82a8526f25415b7d93023611f99bb308 Mon Sep 17 00:00:00 2001 From: Laurin Date: Fri, 2 Feb 2024 15:29:08 +0100 Subject: [PATCH] added test for converting into hex for numbers smaller than 16 --- 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 4ab94ea..c978215 100644 --- a/test/conversionOfNumbers/test_conversionOfNumbers.c +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -124,6 +124,19 @@ void test_convert3ToHexStr3(){ //act result = convertIntToHex(3); + //assert + TEST_ASSERT_EQUAL_STRING(expected, result); + free(result); +} + +void test_convert12ToHexStrC(){ + //arrange + char* result; + char expected[] = "C"; + + //act + result = convertIntToHex(12); + //assert TEST_ASSERT_EQUAL_STRING(expected, result); free(result);