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

@ -199,6 +199,18 @@ void test_convertBinaryStr10110ToInt22(){
//act //act
result = convertBinaryStrToInt("10110"); 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 //assert
TEST_ASSERT_EQUAL_UINT(expected, result); TEST_ASSERT_EQUAL_UINT(expected, result);
} }
Loading…
Cancel
Save