Browse Source

added final test for converting binary input to decimal

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

12
test/conversionOfNumbers/test_conversionOfNumbers.c

@ -189,4 +189,16 @@ void test_convert234ToHexStrEA(){
//assert //assert
TEST_ASSERT_EQUAL_STRING(expected, result); TEST_ASSERT_EQUAL_STRING(expected, result);
free(result); free(result);
}
void test_convertBinaryStr10110ToInt22(){
//arrange
unsigned int result;
unsigned int expected = 22;
//act
result = convertBinaryStrToInt("10110");
//assert
TEST_ASSERT_EQUAL_UINT(expected, result);
} }
Loading…
Cancel
Save