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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Jun 24 10:02:35 CEST 2010


Author: romain
Date: 2010-06-24 10:02:35 +0200 (Thu, 24 Jun 2010)
New Revision: 1703

Modified:
   pkg/Rcpp/inst/unitTests/runit.sugar.plus.R
Log:
similar adjustments for operator+

Modified: pkg/Rcpp/inst/unitTests/runit.sugar.plus.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.sugar.plus.R	2010-06-24 08:02:20 UTC (rev 1702)
+++ pkg/Rcpp/inst/unitTests/runit.sugar.plus.R	2010-06-24 08:02:35 UTC (rev 1703)
@@ -32,26 +32,26 @@
 	checkEquals( fx(1:10) , list( 11:20,11:20,1:10+1:10, 3*(1:10))  )
 }
 
-# test.sugar.plus.seqlen <- function( ){
-# 
-# 	fx <- cxxfunction( signature(), '
-# 		return List::create(
-# 			seq_len(10) + 10, 
-# 			10 + seq_len(10),
-# 			seq_len(10) + seq_len(10)
-# 			) ;
-# 	', plugin = "Rcpp" )
-# 	
-# 	checkEquals( fx() , list( 11:20,11:20, 1:10+1:10)  )
-# }
-# 
-# test.sugar.plus.all <- function( ){
-# 
-# 	fx <- cxxfunction( signature( x = "integer" ), '
-# 		IntegerVector xx(x) ;
-# 		return all( (xx+xx) < 10 ) ;
-# 	', plugin = "Rcpp" )
-# 	
-# 	checkEquals( fx(1:10) , FALSE )
-# }
+test.sugar.plus.seqlen <- function( ){
 
+	fx <- cxxfunction( signature(), '
+		return List::create(
+			seq_len(10) + 10, 
+			10 + seq_len(10),
+			seq_len(10) + seq_len(10)
+			) ;
+	', plugin = "Rcpp" )
+	
+	checkEquals( fx() , list( 11:20,11:20, 1:10+1:10)  )
+}
+
+test.sugar.plus.all <- function( ){
+
+	fx <- cxxfunction( signature( x = "integer" ), '
+		IntegerVector xx(x) ;
+		return all( (xx+xx) < 10 ) ;
+	', plugin = "Rcpp" )
+	
+	checkEquals( fx(1:10) , FALSE )
+}
+



More information about the Rcpp-commits mailing list