[Rcpp-commits] r1033 - in pkg: RcppArmadillo/inst/unitTests RcppGSL/inst/unitTests
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Apr 12 14:07:46 CEST 2010
Author: romain
Date: 2010-04-12 14:07:46 +0200 (Mon, 12 Apr 2010)
New Revision: 1033
Modified:
pkg/RcppArmadillo/inst/unitTests/runTests.R
pkg/RcppGSL/inst/unitTests/runTests.R
Log:
port rev 1031 to RcppArmadillo and RcppGSL
Modified: pkg/RcppArmadillo/inst/unitTests/runTests.R
===================================================================
--- pkg/RcppArmadillo/inst/unitTests/runTests.R 2010-04-12 09:09:50 UTC (rev 1032)
+++ pkg/RcppArmadillo/inst/unitTests/runTests.R 2010-04-12 12:07:46 UTC (rev 1033)
@@ -77,8 +77,12 @@
## stop() if there are any failures i.e. FALSE to unit test.
## This will cause R CMD check to return error and stop
- if(getErrors(tests)$nFail > 0) {
- stop("one of the unit tests failed")
+ err <- getErrors(tests)
+ if( (err$nFail + err$nErr) > 0) {
+ stop( sprintf( "unit test problems: %d failures, %d errors", err$nFail, err$nErr) )
+ } else{
+ success <- err$nTestFunc - err$nFail - err$nErr - err$nDeactivated
+ cat( sprintf( "%d / %d", success, err$nTestFunc ) )
}
}
} else {
Modified: pkg/RcppGSL/inst/unitTests/runTests.R
===================================================================
--- pkg/RcppGSL/inst/unitTests/runTests.R 2010-04-12 09:09:50 UTC (rev 1032)
+++ pkg/RcppGSL/inst/unitTests/runTests.R 2010-04-12 12:07:46 UTC (rev 1033)
@@ -77,8 +77,12 @@
## stop() if there are any failures i.e. FALSE to unit test.
## This will cause R CMD check to return error and stop
- if(getErrors(tests)$nFail > 0) {
- stop("one of the unit tests failed")
+ err <- getErrors(tests)
+ if( (err$nFail + err$nErr) > 0) {
+ stop( sprintf( "unit test problems: %d failures, %d errors", err$nFail, err$nErr) )
+ } else{
+ success <- err$nTestFunc - err$nFail - err$nErr - err$nDeactivated
+ cat( sprintf( "%d / %d", success, err$nTestFunc ) )
}
}
} else {
More information about the Rcpp-commits
mailing list