Browse Source

added test for binaryStrLen in case input is 0

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

12
test/conversionOfNumbers/test_conversionOfNumbers.c

@ -27,3 +27,15 @@ void test_binaryStringLengthOfInput5is3(){
//assert //assert
TEST_ASSERT_EQUAL_INT(expected, result); TEST_ASSERT_EQUAL_INT(expected, result);
} }
void test_binaryStringLengthOfInput0is1(){
//arrange
int result;
int expected = 1;
//act
result = binaryStrLen(0);
//assert
TEST_ASSERT_EQUAL_INT(expected, result);
}
Loading…
Cancel
Save