Closed tdhock closed 3 years ago
Ok great, so I can write unit tests with Rcpp and not have to use gtest? I will read this today.
Its unfortunate because I do like gtest, but it has been so difficult to integrate it with other technologies that it is simply not worth it imo.
no you can't write unit tests with Rcpp. You can write an R interface for your C++ code using Rcpp. Then you can write R code that calls your insert/minimize/etc methods. And I would suggest writing tests in R code using https://r-pkgs.org/tests.html
On Mon, Jun 8, 2020 at 3:01 PM Joseph Vargovich notifications@github.com wrote:
Ok great, so I can write unit tests with Rcpp and not have to use gtest? I will read this today.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/DovahCraft/PartialSetModelSelection/issues/6#issuecomment-640904210, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAHDX4WN4GRETM3K6HRIEA3RVVLYHANCNFSM4NYZL42Q .
Great thanks for the info on that.
Also would be good for you to read some other parts of that book, starting from the beginning, to learn more about how to write your own R package.
Do you think it would be ok if I continued to implement the C++ code with the test suite I have with gtest and then port it over to R unit tests and set up CI at that time too?
Gtest is working well for my development of the core data structure itself, so I wanted to see if I could get that done first. (or at least most of it..)
yes that is fine you can work on both in parallel if you want
Great will do, thanks for the help!
@tdhock Have you ever used Circle CI? I was going to look into it and see if it is easy to use with gtest than Travis CI.
no I have only experience with appveyor, wercker and travis. but please try circle ci if you think it may work. google is your friend. (others must have already got google test working on these platforms)
I would suggest creating the interface using Rcpp modules, please read this https://cloud.r-project.org/web/packages/Rcpp/vignettes/Rcpp-modules.pdf to see how to do that