Browse Source

refactoring: free allocated memory in test functions

remotes/origin/conversionOfNumbers
Laurin 11 months ago
parent
commit
f36bc32ed7
  1. 4
      test/conversionOfNumbers/test_conversionOfNumbers.c

4
test/conversionOfNumbers/test_conversionOfNumbers.c

@ -1,5 +1,6 @@
#include "unity.h"
#include "conversionOfNumbers.h"
#include <stdlib.h>
void setUp(){}
void tearDown(){}
@ -14,6 +15,7 @@ void test_convert2ToBinaryStr10(){
//assert
TEST_ASSERT_EQUAL_STRING(expected, result);
free(result);
}
void test_binaryStringLengthOfInput5is3(){
@ -50,6 +52,7 @@ void test_convert10ToBinaryStr1010(){
//assert
TEST_ASSERT_EQUAL_STRING(expected, result);
free(result);
}
void test_binaryStringLengthOfInputNegative10is5(){
@ -74,4 +77,5 @@ void test_convertNegative12ToBinaryStrNegative1100(){
//assert
TEST_ASSERT_EQUAL_STRING(expected, result);
free(result);
}
Loading…
Cancel
Save