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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 7 15:16:47 CEST 2010


Author: romain
Date: 2010-07-07 15:16:47 +0200 (Wed, 07 Jul 2010)
New Revision: 1810

Removed:
   pkg/Rcpp/inst/unitTests/runit.complex.R
Modified:
   pkg/Rcpp/inst/unitTests/runit.GenericVector.R
Log:
merge runit.complex into runit.GenericVector?\195?\169

Modified: pkg/Rcpp/inst/unitTests/runit.GenericVector.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.GenericVector.R	2010-07-07 13:11:02 UTC (rev 1809)
+++ pkg/Rcpp/inst/unitTests/runit.GenericVector.R	2010-07-07 13:16:47 UTC (rev 1810)
@@ -130,7 +130,15 @@
 						_["bar"] = true ) ;
 					return output ;
 				'
-              )
+              ), 
+              "list_stdcomplex" = list( 
+              		signature() , '
+              			std::vector< std::complex<double> > v_double(10) ;
+    					std::vector< std::complex<float> > v_float(10) ;
+    					return List::create( _["float"] = v_float, _["double"] = v_double ) ;
+    				'
+    			)
+               	
               
         )
 
@@ -286,3 +294,10 @@
 		msg = "List::create" )
 }
 
+test.List.stdcomplex <- function(){
+	fun <- .rcpp.List$list_stdcomplex
+    checkEquals( 
+		fun(), 
+		list( float = rep(0+0i, 10), double = rep(0+0i, 10) ), 
+		msg = "range wrap over std::complex" )
+}

Deleted: pkg/Rcpp/inst/unitTests/runit.complex.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.complex.R	2010-07-07 13:11:02 UTC (rev 1809)
+++ pkg/Rcpp/inst/unitTests/runit.complex.R	2010-07-07 13:16:47 UTC (rev 1810)
@@ -1,35 +0,0 @@
-#!/usr/bin/r -t
-#
-# Copyright (C) 2009 - 2010	Romain Francois
-#
-# This file is part of Rcpp.
-#
-# Rcpp is free software: you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation, either version 2 of the License, or
-# (at your option) any later version.
-#
-# Rcpp is distributed in the hope that it will be useful, but
-# WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with Rcpp.  If not, see <http://www.gnu.org/licenses/>.
-
-test.vector.complex <- function(){
-	
-	fx <- cxxfunction( signature() , '
-
-	std::vector< std::complex<double> > v_double(10) ;
-    std::vector< std::complex<float> > v_float(10) ;
-    
-	return List::create( _["float"] = v_float, _["double"] = v_double ) ;
-    
-	', plugin = "Rcpp" )
-	checkEquals( 
-		fx(), 
-		list( float = rep(0+0i, 10), double = rep(0+0i, 10) ), 
-		msg = "range wrap over std::complex" )
-}
-



More information about the Rcpp-commits mailing list