Q: Generating test cases with all the possible enum values
bakkiaraj opened this issue · 0 comments
Hi,
I am looking api-sanity-checker for auto generating test cases for the C code that we generate using some other Java based tool.
For Ex:
typedef enum {
AM_T_FUNCTION_AM_QSI = 0x0001
} AM_t_Function_AM_t;
typedef enum {
AM_T_GPIO_GPO_11 = 0x0025,
AM_T_GPIO_GPO_3 = 0x002B,
AM_T_GPIO_GPO_5 = 0x002D,
AM_T_GPIO_GPO_6 = 0x002E,
AM_T_GPIO_RFE_GPO_0 = 0x004A,
AM_T_GPIO_RFE_GPO_1 = 0x004B,
AM_T_GPIO_RFE_GPO_2 = 0x004C,
AM_T_GPIO_RFE_GPO_3 = 0x004D
} AM_t_GPIO_t;
typedef enum {
AM_T_POLARITY_low = 0x0000,
AM_T_POLARITY_high = 0x0001
} AM_t_Polarity_t;
int AM_AssignGpio_cmd(const AM_t_Function_AM_t func, const AM_t_GPIO_t gpio, const AM_t_Polarity_t polarity )
As of now the tool correctly generate the unit test by using first enum params (Ex: AM_T_GPIO_GPO_11) and the random mode pick the random combinations correctly.
What I am looking for is generate the permutaion and combinations of test cases only for enum parameters, is it possible?
Thanks for your efforts and great tool.