[Rcpp-commits] r1616 - pkg/Rcpp/inst/unitTests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Jun 19 11:31:52 CEST 2010


Author: romain
Date: 2010-06-19 11:31:51 +0200 (Sat, 19 Jun 2010)
New Revision: 1616

Modified:
   pkg/Rcpp/inst/unitTests/runit.sugar.sapply.R
Log:
adapt sapply for lists

Modified: pkg/Rcpp/inst/unitTests/runit.sugar.sapply.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.sugar.sapply.R	2010-06-19 09:31:33 UTC (rev 1615)
+++ pkg/Rcpp/inst/unitTests/runit.sugar.sapply.R	2010-06-19 09:31:51 UTC (rev 1616)
@@ -79,19 +79,11 @@
 
 test.sugar.sapply.list <- function( ){
 
-	inc <- '
-	template <typename T>
-	class square : public std::unary_function<T,T> {
-	public:
-		T operator()( T t) const { return t*t ; }
-	} ;
-	'
-	
 	fx <- cxxfunction( signature( x = "integer" ), '
 		IntegerVector xx(x) ;
 		List res = sapply( xx, seq_len );
 		return res ;
-	', include = inc, plugin = "Rcpp" )
+	', plugin = "Rcpp" )
 	
 	checkEquals( fx(1:10), lapply( 1:10, seq_len ) )
 }



More information about the Rcpp-commits mailing list