I'm using VectorCAST for unit testing, with Green Hills compiler and Renesas v850e2v3 microcontroller, and VectorCAST indicates that I have two branches to test in the following for loop.
typedef enum
{
MIN_ENUM_VAL = 0x00,
ENUM_VAL_1 = 0x01,
ENUM_VAL_2 = 0x02,
MAX_ENUM_VAL
} Enumeration_T;
void myFunction (void)
{
int counter;
for(counter = MIN_ENUM_VAL; counter < MAX_ENUM_VAL; counter++)
{
//Do something.
}
//Do something else.
}
How can I test these branches? Really I don't have idea on how to test inside the for loop.