Thursday 15 July 2010

r - Unit testing Rcpp code in a package -



r - Unit testing Rcpp code in a package -

i have c++ code in bundle want unit test , don't want export r. i've seen:

unit tests code in /src folder of r package?

and code want test falls sec category:

or consider c code more standalone, in case utilize 1 of bazillion unit testing frameworks c.

if 1 wants test c++ (not in using r framework) best way setup test suite? set c++ tests in tests/ , have c++ programme main somewhere, or write driver function execute c++ tests , phone call r?

i imagine thought have tests automated r cmd check well, i'm not clear on how automate using r bundle framework.

i not follow:

either is rcpp code, do not want expose r: moment wan expose (r) unit tests (in packaging framework) though. or question of picking 1 of (a great many) c++ unit testing framework boost test library, or google c++ testing library, or ... --- none of has been ported r "as such"

can clarify question little more?

maybe want express c++ code in way lets rcpp phone call from unit tests results can test via 1 of popular r unit testing frameworks. in case reply may similar 1 of (currently) 276 rcpp-using packages on cran many do in fact utilize unit tests.

r unit-testing rcpp

No comments:

Post a Comment