From 2faaa84310e8be278d8277914c2b9f60e81f586a Mon Sep 17 00:00:00 2001 From: Laurin Date: Fri, 2 Feb 2024 16:01:47 +0100 Subject: [PATCH] added test to make sure hexStrLen function behaves as corrected --- 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 e5fd37a..897bcb9 100644 --- a/test/conversionOfNumbers/test_conversionOfNumbers.c +++ b/test/conversionOfNumbers/test_conversionOfNumbers.c @@ -150,6 +150,18 @@ void test_hexStringLengthOfInput256is3(){ //act result = hexStrLen(256); + //assert + TEST_ASSERT_EQUAL_INT(expected, result); +} + +void test_hexStringLengthOfInput255is2(){ + //arrange + int result; + int expected = 2; + + //act + result = hexStrLen(255); + //assert TEST_ASSERT_EQUAL_INT(expected, result); } \ No newline at end of file