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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sat Nov 27 03:21:41 CET 2010


Author: edd
Date: 2010-11-27 03:21:41 +0100 (Sat, 27 Nov 2010)
New Revision: 2545

Modified:
   pkg/Rcpp/inst/unitTests/runit.client.package.R
Log:
run each test as a different test function call


Modified: pkg/Rcpp/inst/unitTests/runit.client.package.R
===================================================================
--- pkg/Rcpp/inst/unitTests/runit.client.package.R	2010-11-26 22:00:30 UTC (rev 2544)
+++ pkg/Rcpp/inst/unitTests/runit.client.package.R	2010-11-27 02:21:41 UTC (rev 2545)
@@ -21,24 +21,27 @@
 	td <- tempfile()
 	cwd <- getwd()
 	dir.create( td )
-	file.copy( system.file( "unitTests", pkg, package = "Rcpp" ) , td, recursive = TRUE) 
+	file.copy( system.file( "unitTests", pkg, package = "Rcpp" ) , td, recursive = TRUE)
 	setwd( td )
 	on.exit( { setwd( cwd) ; unlink( td, recursive = TRUE ) } )
 	R <- shQuote( file.path( R.home( component = "bin" ), "R" ))
-	cmd <- paste( R , "CMD build", pkg ) 
+	cmd <- paste( R , "CMD build", pkg )
 	system( cmd )
 	dir.create( "templib" )
 	install.packages( paste( pkg, "_1.0.tar.gz", sep = "" ), "templib", repos = NULL, type = "source" )
 	require( pkg, "templib", character.only = TRUE )
-	
+
 	hello_world <- get( "rcpp_hello_world", asNamespace( pkg ) )
 	checkEquals( hello_world(), list( c("foo", "bar"), c(0.0, 1.0) ), msg = "code from client package" )
-	
+
 	checkException( .Call("hello_world_ex", PACKAGE = pkg ), msg = "exception in client package" )
 }
 
-test.client.package <- function(){
-	.client.package( "RcppTestA" )
-	.client.package( "RcppTestB" )
+test.client.packageA <- function(){
+    .client.package( "RcppTestA" )
 }
 
+test.client.packageB <- function(){
+    .client.package( "RcppTestB" )
+}
+



More information about the Rcpp-commits mailing list