From db5f6c11069cbd8e118c9a5208785531e9f6b83c Mon Sep 17 00:00:00 2001 From: Laurin Date: Sat, 3 Feb 2024 10:55:50 +0100 Subject: [PATCH] added test for converting hex input to decimal --- test/conversionOfNumbers/test_conversionOfNumbers.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/conversionOfNumbers/test_conversionOfNumbers.c b/test/conversionOfNumbers/test_conversionOfNumbers.c index b9a0429..db390e7 100644 --- a/test/conversionOfNumbers/test_conversionOfNumbers.c +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -199,6 +199,18 @@ void test_convertBinaryStr10110ToInt22(){ //act result = convertBinaryStrToInt("10110"); + //assert + TEST_ASSERT_EQUAL_UINT(expected, result); +} + +void test_convertHexStr2A3ToInt675(){ + //arrange + unsigned int result; + unsigned int expected = 675; + + //act + result = convertHexStrToInt("2A3"); + //assert TEST_ASSERT_EQUAL_UINT(expected, result); } \ No newline at end of file