I have some C++ code in a package that I want to unit test and I don't want to export to R. I've seen:
Unit tests for code in the /src folder of an R package?
and the code I want to test falls into the second category:
Or you consider your C code to be more standalone, in which case you could use one of a bazillion unit testing frameworks for C.
If one wants to test from C++ (not in using a R framework) what is the best way to setup the test suite? Do you put your C++ tests in tests/
and then have a C++ program with a main somewhere, or do you write a driver function to execute all the C++ tests and then call it from R?
I imagine it is probably a good idea to have the tests be automated by R CMD check
as well, which I'm not clear on how to automate using the R package framework.