I have a C module and I want to refactor a little bit. There are some global variables and structures which are not hidden (in the module.h file). I use this variables in some test case but nowhere else so I thought it's a good idea to set them to static. In my test cases I extern these variables and fill with test values. But if they will be static variables I can't reach them from the test case. I don't want to write getter and setter methods and put it to the .h file, because I want to hide this variables.
I know if I include the .c file into my test case I can see the static variables. Is there any other way to fill these variables?
I use cygwin and gcc, the test framework is CppUtest.
Thanks in advance.