Open
Description
Description
It seems that some C++ keywords cannot be used as parameter names in C functions, because generated tests cannot be run. For instance and
, and_eq
or bitand
and probably others.
To Reproduce
Generate tests for following function and try to run them:
int param_name_and(int and) {
return and * and;
}
Expected behavior
Tests are generated and executed.
Actual behavior
Tests are generated but execution fails. Following error could be found in the logs:
In file included from /home/utbot/remote/SampleDocker2/tests/makefiles/src/../../../tests/src/params_dot_c_test.cpp:5:
/home/utbot/remote/SampleDocker2/tests/makefiles/src/../../../tests/src/params_dot_c_test.h:65:39: error: expected identifier
return param_name_and_src_params_c(and);
params_dot_c_test.h
...
extern "C" int param_name_and_src_params_c(int and);
static int param_name_and(int and) {
return param_name_and_src_params_c(and);
}
...
Additional context
To verify other keywords please use attached file, rename extension to c
and probably comment out param_name_wchar_t
function as it seems separate problem. Then generate and run tests.
Metadata
Metadata
Assignees
Type
Projects
Status
Todo