Browse Source

added test for converting hex input to decimal

remotes/origin/conversionOfNumbers
Laurin 11 months ago
parent
commit
db5f6c1106
  1. 12
      test/conversionOfNumbers/test_conversionOfNumbers.c

12
test/conversionOfNumbers/test_conversionOfNumbers.c

@ -202,3 +202,15 @@ void test_convertBinaryStr10110ToInt22(){
//assert //assert
TEST_ASSERT_EQUAL_UINT(expected, result); 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);
}
Loading…
Cancel
Save