Skip to content

Commit c4d9302

Browse files
committed
try to get tests so they can run on CRAN (not there yet)
1 parent 1c44195 commit c4d9302

3 files changed

Lines changed: 9 additions & 22 deletions

File tree

.travis.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,8 @@ before_install:
55
- chmod 755 ./travis-tool.sh
66
- ./travis-tool.sh bootstrap
77
- ./travis-tool.sh github_package hadley/testthat
8-
- if [ "$RCPP" = "Rcpp" ]; then ./travis-tool.sh github_package RcppCore/Rcpp; fi
9-
- if [ "$RCPP" = "Rcpp11" ]; then ./travis-tool.sh github_package Rcpp11/Rcpp11; ./travis-tool.sh github_package Rcpp11/attributes; fi
10-
8+
- ./travis-tool.sh github_package RcppCore/Rcpp
9+
1110
script:
1211
- R CMD INSTALL .
1312
- cd tests
@@ -18,6 +17,4 @@ notifications:
1817
on_success: change
1918
on_failure: change
2019

21-
env:
22-
- RCPP=Rcpp
23-
- RCPP=Rcpp11
20+

man/setThreadOptions.Rd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ defaultNumThreads()
3939
}
4040
4141
\examples{
42-
\dontrun{
42+
library(RcppParallel)
43+
4344
setThreadOptions(numThreads = 4)
4445
4546
defaultNumThreads()
4647
}
47-
}
4848

tests/testthat.R

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
require(methods)
2-
require(RcppParallel)
3-
require(testthat)
1+
library(testthat)
2+
library(Rcpp)
3+
library(RcppParallel)
44

5-
RCPP <- Sys.getenv( "RCPP" )
6-
if( RCPP == "Rcpp" ){
7-
message( "testing against Rcpp" )
8-
require(Rcpp)
9-
} else if( RCPP == "Rcpp11" ){
10-
message( "testing against Rcpp11" )
11-
require(attributes)
12-
} else {
13-
stop( "Rcpp implementation not setup, please set the $RCPP environment variable" )
14-
}
155

16-
test_dir("testthat")
6+
test_check("RcppParallel")
177

0 commit comments

Comments
 (0)