| 1 |
|
| 2 |
#include "CppUTest/StandardCLibrary.h" |
| 3 |
|
| 4 |
extern "C" |
| 5 |
{ |
| 6 |
#include "AllocLetTestFree.h" |
| 7 |
} |
| 8 |
|
| 9 |
#include "CppUTest/TestHarness.h" |
| 10 |
|
| 11 |
#if CPPUTEST_USE_STD_C_LIB |
| 12 |
/* |
| 13 |
* This test makes sure that memory leak malloc macros are forced into .cpp and .c files |
| 14 |
*/ |
| 15 |
TEST_GROUP(AllocLetTestFree) |
| 16 |
{ |
| 17 |
AllocLetTestFree allocLetTestFree; |
| 18 |
|
| 19 |
void setup() |
| 20 |
{ |
| 21 |
allocLetTestFree = AllocLetTestFree_Create(); |
| 22 |
} |
| 23 |
|
| 24 |
void teardown() |
| 25 |
{ |
| 26 |
AllocLetTestFree_Destroy(allocLetTestFree); |
| 27 |
} |
| 28 |
}; |
| 29 |
|
| 30 |
TEST(AllocLetTestFree, Create) |
| 31 |
{ |
| 32 |
free(allocLetTestFree); |
| 33 |
} |
| 34 |
|
| 35 |
#endif |