maybe there is someone who has experience with Unit Testing with cpputest.
I have something like this:
Source code Under Test:
main_function()
{
static int8 is_functioncalled = 1;
if (is_functioncalled){
my_local_function();
is_functioncalled = 0
}
UNIT Test Environment:
TEST(TESTGROUP,TEST_CASE1){
//Some Unit Test checks of my_local_function()
main_function();
}
TEST(TESTGROUP,TEST_CASE2){
//Some other Unit Test stuff
main_function(); // --> my_local_function() will not be called in this test case because it's called already before
}
I need in TEST_CASE2 the function my_local_function() to be called again. This function is indirectly called through the public interface main_function() which can be called directly within the Unit Test. Does anybody have an idea how to do this in generally or in cpputest environment ?