Browse Source

added test for implementation of hexStrLen function into convertIntToHex function

remotes/origin/conversionOfNumbers
Laurin 11 months ago
parent
commit
bfaccfaecd
  1. 13
      test/conversionOfNumbers/test_conversionOfNumbers.c

13
test/conversionOfNumbers/test_conversionOfNumbers.c

@ -177,3 +177,16 @@ void test_hexStringLengthOfInput0is1(){
//assert //assert
TEST_ASSERT_EQUAL_INT(expected, result); 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);
}
Loading…
Cancel
Save