Browse Source

added test for converting negative integer

remotes/origin/conversionOfNumbers
Laurin 1 year ago
parent
commit
f68d810697
  1. 12
      test/conversionOfNumbers/test_conversionOfNumbers.c

12
test/conversionOfNumbers/test_conversionOfNumbers.c

@ -62,4 +62,16 @@ void test_binaryStringLengthOfInputNegative10is5(){
//assert
TEST_ASSERT_EQUAL_INT(expected, result);
}
void test_convertNegative12ToBinaryStrNegative1100(){
//arrange
char* result;
char expected[] = "-1100";
//act
result = convertIntToBinaryStr(-12);
//assert
TEST_ASSERT_EQUAL_STRING(expected, result);
}
Loading…
Cancel
Save