[Rcpp-commits] r1367 - pkg/Rcpp/inst/doc/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat May 29 19:59:30 CEST 2010


Author: romain
Date: 2010-05-29 19:59:30 +0200 (Sat, 29 May 2010)
New Revision: 1367

Modified:
   pkg/Rcpp/inst/doc/unitTests/Rcpp-unitTests.R
Log:
R CMD build did not know about cppfunction

Modified: pkg/Rcpp/inst/doc/unitTests/Rcpp-unitTests.R
===================================================================
--- pkg/Rcpp/inst/doc/unitTests/Rcpp-unitTests.R	2010-05-29 13:12:59 UTC (rev 1366)
+++ pkg/Rcpp/inst/doc/unitTests/Rcpp-unitTests.R	2010-05-29 17:59:30 UTC (rev 1367)
@@ -2,7 +2,16 @@
 
 # load this package
 require( pkg, character.only = TRUE )
+require( inline )
 
+if( compareVersion( packageDescription( "inline" )[["Version"]], "0.3.4.4" ) < 0 ){
+	stop( "Rcpp unit tests need at least the version 0.3.4.4 of inline" )
+}
+
+cppfunction <- function( ... ){
+	cxxfunction( ..., plugin = "Rcpp" )
+}
+
 #load RUnit
 runit <- "RUnit" ; require( runit, character.only = TRUE )
 if( file.exists( "unitTests-results" ) ){ unlink("unitTests-results", recursive = TRUE ) }



More information about the Rcpp-commits mailing list