|
| 1 | +#!/usr/bin/env r |
| 2 | +# -*- mode: R; tab-width: 4; -*- |
| 3 | +# |
| 4 | +# Copyright (C) 2016 Dirk Eddelbuettel |
| 5 | +# |
| 6 | +# This file is part of Rcpp. |
| 7 | +# |
| 8 | +# Rcpp is free software: you can redistribute it and/or modify it |
| 9 | +# under the terms of the GNU General Public License as published by |
| 10 | +# the Free Software Foundation, either version 2 of the License, or |
| 11 | +# (at your option) any later version. |
| 12 | +# |
| 13 | +# Rcpp is distributed in the hope that it will be useful, but |
| 14 | +# WITHOUT ANY WARRANTY; without even the implied warranty of |
| 15 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 16 | +# GNU General Public License for more details. |
| 17 | +# |
| 18 | +# You should have received a copy of the GNU General Public License |
| 19 | +# along with Rcpp. If not, see <http://www.gnu.org/licenses/>. |
| 20 | + |
| 21 | +.runThisTest <- Sys.getenv("RunAllRcppTests") == "yes" |
| 22 | + |
| 23 | +if (.runThisTest) { |
| 24 | + |
| 25 | + test.Rcpp.system.file <- function() { |
| 26 | + inc_rcpp <- Rcpp:::Rcpp.system.file("include") |
| 27 | + inc_sys <- tools::file_path_as_absolute( base::system.file("include", package = "Rcpp")) |
| 28 | + checkEquals(inc_rcpp, inc_sys, msg = "Rcpp.system.file") |
| 29 | + |
| 30 | + } |
| 31 | + |
| 32 | + test.RcppLd <- function() { |
| 33 | + checkTrue(Rcpp:::RcppLdPath() == "", msg = "RcppLdPath") |
| 34 | + checkTrue(Rcpp:::RcppLdFlags() == "", msg = "RcppLdFlags") |
| 35 | + checkEquals(Rcpp:::LdFlags(), NULL, msg = "LdFlags") |
| 36 | + } |
| 37 | + |
| 38 | + test.RcppCxx <- function() { |
| 39 | + checkTrue(Rcpp:::canUseCXX0X(), msg = "canUseCXX0X") |
| 40 | + checkTrue(Rcpp:::RcppCxxFlags() != "", msg = "RcppCxxFlags()") |
| 41 | + checkEquals(Rcpp:::CxxFlags(), NULL, msg = "CxxFlags()") |
| 42 | + |
| 43 | + checkTrue(length(Rcpp:::RcppCapabilities()) >= 13, msg = "RcppCapabilities()") |
| 44 | + } |
| 45 | +} |
0 commit comments