Skip to content

Commit d5cb860

Browse files
authored
Merge pull request #1008 from RcppCore/bugfix/expose_class_test
Bugfix/expose class test (closes #1006)
2 parents 15dee28 + b58b276 commit d5cb860

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

ChangeLog

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
2019-10-27 Dirk Eddelbuettel <[email protected]>
2+
3+
* DESCRIPTION (Version, Date): Roll minor version
4+
5+
* inst/unitTests/runit.exposeClass.R: Updated to pass with r-devel
6+
17
2019-10-26 Dirk Eddelbuettel <[email protected]>
28

39
* vignettes/Rcpp-package.Rnw: Another wrapper

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: Rcpp
22
Title: Seamless R and C++ Integration
3-
Version: 1.0.2.3
4-
Date: 2019-10-20
3+
Version: 1.0.2.4
4+
Date: 2019-10-27
55
Author: Dirk Eddelbuettel, Romain Francois, JJ Allaire, Kevin Ushey, Qiang Kou,
66
Nathan Russell, Douglas Bates and John Chambers
77
Maintainer: Dirk Eddelbuettel <[email protected]>

inst/unitTests/runit.exposeClass.R

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,14 @@ class foo {
4646
## create package
4747
Rcpp.package.skeleton(pkg_name, path=path, environment = environment(),
4848
example_code = FALSE, module = TRUE)
49+
## R 4.0.0 (currently in development) is stricter about the NAMESPACE and wants
50+
## - an actual function behind the export declaration we end up with here
51+
## - an export declaration for the class exposed and check below
52+
## so we provide both to comply (and also no longer delete from src/ and R/)
53+
cat("Rcpp.fake.fun <- function() {}", file=file.path(path, pkg_name, "R", "fakefun.R"))
54+
cat("export(\"fooR\")", append=TRUE, file=file.path(path, pkg_name, "NAMESPACE"))
55+
4956
on.exit(unlink(pkg_path, recursive=TRUE))
50-
file.remove(list.files(c(src_path, R_path), full.names = TRUE))
5157
cat(foo_header, file = file.path(src_path, "foo.h"))
5258

5359
## check that result of exposeClass compiles and runs properly

tests/doRUnit.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ if (requireNamespace("RUnit", quietly=TRUE) &&
6363
tests <- runTestSuite(testSuite) # Run tests
6464

6565
printTextProtocol(tests) # Print results
66+
printTextProtocol(tests, file="/tmp/RcppTestLog.txt")
6667

6768
## Return success or failure to R CMD CHECK
6869
if (getErrors(tests)$nFail > 0) stop("TEST FAILED!")

0 commit comments

Comments
 (0)