Skip to content

Commit 9ebcf41

Browse files
committed
fix sum rcpp error on Unix systems (cpp11test)
1 parent aeb1895 commit 9ebcf41

File tree

9 files changed

+44
-26
lines changed

9 files changed

+44
-26
lines changed

cpp11test/.Rbuildignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
^\.here$
2+
^bench$
3+
^LICENSE\.md$

cpp11test/DESCRIPTION

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ Authors@R:
1212
Description: Provides a test suite and benchmarking code for the 'cpp11' package.
1313
License: MIT + file LICENSE
1414
Encoding: UTF-8
15-
LinkingTo: Rcpp, cpp11, testthat
15+
LinkingTo: cpp11, Rcpp, testthat
16+
Imports: cpp11, Rcpp
1617
Suggests:
1718
covr,
18-
testthat,
19+
testthat (>= 3.0.0),
1920
pkgload,
2021
xml2
2122
LazyData: true
2223
Roxygen: list(markdown = TRUE)
23-
RoxygenNote: 7.1.1
24+
RoxygenNote: 7.3.2
25+
Config/testthat/edition: 3

cpp11test/LICENSE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
YEAR: 2025
2+
COPYRIGHT HOLDER: cpp11test authors

cpp11test/LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# MIT License
2+
3+
Copyright (c) 2025 cpp11test authors
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

cpp11test/NAMESPACE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
export(run_tests)
44
exportPattern("_$")
55
importFrom(Rcpp,sourceCpp)
6+
importFrom(cpp11,cpp_source)
67
useDynLib(cpp11test, .registration = TRUE)

cpp11test/R/cpp11test-package.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#' @keywords internal
22
#' @exportPattern "_$"
3+
#' @importFrom cpp11 cpp_source
34
#' @importFrom Rcpp sourceCpp
5+
NULL
46
"_PACKAGE"
57

68
# The following block is used by usethis to automatically manage

cpp11test/R/test.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,5 @@ run_tests <- function(reporter = testthat::default_reporter()) {
2222
on.exit(setwd(old))
2323
setwd(system.file("tests", package = "cpp11test"))
2424

25-
library(testthat)
26-
test_check("cpp11test", reporter = reporter)
25+
testthat::test_check("cpp11test", reporter = reporter)
2726
}

cpp11test/man/cpp11test-package.Rd

Lines changed: 0 additions & 20 deletions
This file was deleted.

cpp11test/tests/testthat.R

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1+
# This file is part of the standard setup for testthat.
2+
# It is recommended that you do not modify it.
3+
#
4+
# Where should you do additional test configuration?
5+
# Learn more about the roles of various files in:
6+
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
7+
# * https://testthat.r-lib.org/articles/special-files.html
8+
19
library(testthat)
2-
library(cpp11)
10+
library(cpp11test)
311

412
test_check("cpp11test")

0 commit comments

Comments
 (0)