From bfaccfaecd9678359d6f4ff29e42dadb6625ea90 Mon Sep 17 00:00:00 2001 From: Laurin Date: Fri, 2 Feb 2024 16:11:38 +0100 Subject: [PATCH] added test for implementation of hexStrLen function into convertIntToHex function --- 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 5b11535..c29c097 100644 --- a/test/conversionOfNumbers/test_conversionOfNumbers.c +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -176,4 +176,17 @@ void test_hexStringLengthOfInput0is1(){ //assert TEST_ASSERT_EQUAL_INT(expected, result); +} + +void test_convert234ToHexStrEA(){ + //arrange + char* result; + char expected[] = "EA"; + + //act + result = convertIntToHex(234); + + //assert + TEST_ASSERT_EQUAL_STRING(expected, result); + free(result); } \ No newline at end of file