I have three code files for an arduino project:
main.ino <-- main sketch
helper.cpp <-- helper functions, no avr code
helper_test.cpp <-- unit test for helpers
Arduino will attempt to include helper_test.cpp, and will be confused by its inclusion of the unit test library header files (which happen to be google test). If the unit test contains a C main function it will skip everything in main.ino and try to use only that.
I know there are dedicated arduino unit test frameworks, these are just regular c++ unit tests for math functions that don't touch any avr-related code.
How can I lay these files out or make this so arduino won't try to include helper_test.cpp but will include helper.cpp?