Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix sum rcpp error on Unix systems (cpp11test) #439

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions cpp11test/.Rbuildignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
^\.here$
^bench$
^LICENSE\.md$
8 changes: 5 additions & 3 deletions cpp11test/DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,14 @@ Authors@R:
Description: Provides a test suite and benchmarking code for the 'cpp11' package.
License: MIT + file LICENSE
Encoding: UTF-8
LinkingTo: Rcpp, cpp11, testthat
LinkingTo: cpp11, Rcpp, testthat
Imports: cpp11, Rcpp
Suggests:
covr,
testthat,
testthat (>= 3.0.0),
pkgload,
xml2
LazyData: true
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.1
RoxygenNote: 7.3.2
Config/testthat/edition: 3
2 changes: 2 additions & 0 deletions cpp11test/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
YEAR: 2025
COPYRIGHT HOLDER: cpp11test authors
21 changes: 21 additions & 0 deletions cpp11test/LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# MIT License

Copyright (c) 2025 cpp11test authors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
1 change: 1 addition & 0 deletions cpp11test/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
export(run_tests)
exportPattern("_$")
importFrom(Rcpp,sourceCpp)
importFrom(cpp11,cpp_source)
useDynLib(cpp11test, .registration = TRUE)
2 changes: 2 additions & 0 deletions cpp11test/R/cpp11test-package.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#' @keywords internal
#' @exportPattern "_$"
#' @importFrom cpp11 cpp_source
#' @importFrom Rcpp sourceCpp
NULL
"_PACKAGE"

# The following block is used by usethis to automatically manage
Expand Down
3 changes: 1 addition & 2 deletions cpp11test/R/test.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,5 @@ run_tests <- function(reporter = testthat::default_reporter()) {
on.exit(setwd(old))
setwd(system.file("tests", package = "cpp11test"))

library(testthat)
test_check("cpp11test", reporter = reporter)
testthat::test_check("cpp11test", reporter = reporter)
}
20 changes: 0 additions & 20 deletions cpp11test/man/cpp11test-package.Rd

This file was deleted.

10 changes: 9 additions & 1 deletion cpp11test/tests/testthat.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
# This file is part of the standard setup for testthat.
# It is recommended that you do not modify it.
#
# Where should you do additional test configuration?
# Learn more about the roles of various files in:
# * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
# * https://testthat.r-lib.org/articles/special-files.html

library(testthat)
library(cpp11)
library(cpp11test)

test_check("cpp11test")
Loading