[Rcpp-commits] r1297 - in pkg/Rcpp: . inst/include/Rcpp/internal inst/unitTests tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu May 20 19:08:42 CEST 2010


Author: romain
Date: 2010-05-20 19:08:42 +0200 (Thu, 20 May 2010)
New Revision: 1297

Modified:
   pkg/Rcpp/DESCRIPTION
   pkg/Rcpp/inst/include/Rcpp/internal/Proxy_Iterator.h
   pkg/Rcpp/inst/unitTests/runTests.R
   pkg/Rcpp/tests/doRUnit.R
Log:
constness in Proxy_Iterator and saving Rcpp-unitTests.txt files in Rcpp.Rcheck directory when run under R CMD check

Modified: pkg/Rcpp/DESCRIPTION
===================================================================
--- pkg/Rcpp/DESCRIPTION	2010-05-20 14:51:13 UTC (rev 1296)
+++ pkg/Rcpp/DESCRIPTION	2010-05-20 17:08:42 UTC (rev 1297)
@@ -1,6 +1,6 @@
 Package: Rcpp
 Title: Rcpp R/C++ interface package
-Version: 0.8.0.1
+Version: 0.8.1
 Date: $Date$
 Author: Dirk Eddelbuettel and Romain Francois, with contributions 
  by Simon Urbanek, David Reiss and Douglas Bates; based on code written during 

Modified: pkg/Rcpp/inst/include/Rcpp/internal/Proxy_Iterator.h
===================================================================
--- pkg/Rcpp/inst/include/Rcpp/internal/Proxy_Iterator.h	2010-05-20 14:51:13 UTC (rev 1296)
+++ pkg/Rcpp/inst/include/Rcpp/internal/Proxy_Iterator.h	2010-05-20 17:08:42 UTC (rev 1297)
@@ -85,26 +85,26 @@
 			return &proxy ;
 		}
 		
-		inline bool operator==( const Proxy_Iterator& y) {
+		inline bool operator==( const Proxy_Iterator& y) const {
 			return ( this->proxy.index == y.proxy.index ) && ( this->proxy.parent == y.proxy.parent );
 		}
-		inline bool operator!=( const Proxy_Iterator& y) {
+		inline bool operator!=( const Proxy_Iterator& y) const {
 			return ( this->proxy.index != y.proxy.index ) || ( this->proxy.parent != y.proxy.parent );
 		}
-		inline bool operator<( const Proxy_Iterator& other ) {
+		inline bool operator<( const Proxy_Iterator& other ) const {
 			return proxy.index < other.proxy.index ;
 		}
-		inline bool operator>( const Proxy_Iterator& other ) {
+		inline bool operator>( const Proxy_Iterator& other ) const {
 			return proxy.index > other.proxy.index ;
 		}
-		inline bool operator<=( const Proxy_Iterator& other ) {
+		inline bool operator<=( const Proxy_Iterator& other ) const {
 			return proxy.index <= other.proxy.index ;
 		}
-		inline bool operator>=( const Proxy_Iterator& other ) {
+		inline bool operator>=( const Proxy_Iterator& other ) const {
 			return proxy.index >= other.proxy.index ;
 		}
 		
-		inline difference_type operator-(const Proxy_Iterator& other) {
+		inline difference_type operator-(const Proxy_Iterator& other) const {
 			return proxy.index - other.proxy.index ;
 		}
 

Modified: pkg/Rcpp/inst/unitTests/runTests.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runTests.R	2010-05-20 14:51:13 UTC (rev 1296)
+++ pkg/Rcpp/inst/unitTests/runTests.R	2010-05-20 17:08:42 UTC (rev 1297)
@@ -16,7 +16,9 @@
     ## --- Testing ---
 
     ## Define tests
-    testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs = path )
+    testSuite <- defineTestSuite(name=paste(pkg, "unit testing"), dirs = path
+    	# , testFileRegexp = "runit.Argument.R"
+    )
 
     if(interactive()) {
         cat("Now have RUnit Test Suite 'testSuite' for package '", pkg,
@@ -40,16 +42,22 @@
         		}
         	}
         }
-        
-        # give a chance to the user to customize where he/she wants 
-        # the unit tests results to be stored with the --output= command 
-        # line argument
-        if( exists( "argv",  globalenv() ) ){
-        	# littler
-        	output <- process_args(argv)
-        } else {
-        	# Rscript
-        	output <- process_args(commandArgs(TRUE))
+               
+        # R CMD check uses this
+        if( exists( "Rcpp.unit.test.output.dir", globalenv() ) ){
+			output <- Rcpp.unit.test.output.dir
+		} else {
+          
+        	# give a chance to the user to customize where he/she wants 
+        	# the unit tests results to be stored with the --output= command 
+        	# line argument
+        	if( exists( "argv",  globalenv() ) ){
+        		# littler
+        		output <- process_args(argv)
+        	} else {
+        		# Rscript
+        		output <- process_args(commandArgs(TRUE))
+        	}
         }
         
         # if it did not work, try to use /tmp

Modified: pkg/Rcpp/tests/doRUnit.R
===================================================================
--- pkg/Rcpp/tests/doRUnit.R	2010-05-20 14:51:13 UTC (rev 1296)
+++ pkg/Rcpp/tests/doRUnit.R	2010-05-20 17:08:42 UTC (rev 1297)
@@ -24,6 +24,8 @@
   # without this, we get unit test failures
   Sys.setenv( R_TESTS = "" )
   
+  Rcpp.unit.test.output.dir <- getwd()
+  
   source(file.path(path, "runTests.R"), echo = TRUE)
   
 } else {



More information about the Rcpp-commits mailing list