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

@ -24,6 +24,18 @@ void test_binaryStringLengthOfInput5is3(){
//act
result = binaryStrLen(5);
//assert
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