[Rprotobuf-yada] unit tests
Romain Francois
romain.francois at dbmail.com
Sat Dec 19 15:17:40 CET 2009
The vignette refused to build for some reason, so I wiped it out (not
very constructive way of doing things, ...).
We definitely need testing. I am still not 100% clear about garbage
collection, finalizers and external pointers. unit testing would help me
sleep at nights.
RUnit/svUnit, I don't really care. One plus for RUnit is that it has
report generation which svUnit currently lacks. Did you get round to
have a look at how google tests the C++ code ?
In terms of development, what I do now on the package is bring to R the
C++ classes as external pointers, starting with the streams :
$ grep setClass.*Stream pkg/R/*.R
pkg/R/00classes.R:setClass( "ZeroCopyInputStream", representation(
pkg/R/00classes.R:setClass( "ArrayInputStream", contains =
"ZeroCopyInputStream" )
pkg/R/00classes.R:setClass( "FileInputStream", contains =
"ZeroCopyInputStream" )
pkg/R/00classes.R:setClass( "ConnectionInputStream", contains =
"ZeroCopyInputStream" )
pkg/R/00classes.R:setClass( "ZeroCopyOutputStream", representation(
pkg/R/00classes.R:setClass( "ArrayOutputStream", contains =
"ZeroCopyInputStream" )
pkg/R/00classes.R:setClass( "FileOutputStream", contains =
"ZeroCopyInputStream" )
pkg/R/00classes.R:setClass( "ConnectionOutputStream", contains =
"ZeroCopyOutputStream" )
mapping their c++ counterparts.
http://code.google.com/apis/protocolbuffers/docs/reference/cpp/google.protobuf.io.zero_copy_stream.html
This is more an experiment and a way of learning about how to do it. You
don't need to use or know about these classes to use the package.
And it is quite a repetitive task, so I am starting to think about make
some sort of code generator .... could be good for Rcpp as well
On 12/19/2009 02:56 PM, Dirk Eddelbuettel wrote:
> So what is the story on unit tests? I saw you removed the vignette; the
> Suggests on svUnit is still there. Can we / shall we add some tests?
>
> Dirk
>
--
Romain Francois
Professional R Enthusiast
+33(0) 6 28 91 30 30
http://romainfrancois.blog.free.fr
|- http://tr.im/HlX9 : new package : bibtex
|- http://tr.im/Gq7i : ohloh
`- http://tr.im/FtUu : new package : highlight
More information about the Rprotobuf-yada
mailing list