File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1+ 2019-11-26 Dirk Eddelbuettel <edd@debian.org>
2+
3+ * inst/tinytest/test_embedded_r.R: Use sink to suppress noisy output,
4+ reenable tests (still conditional on usual environment variable)
5+
162019-11-25 Dirk Eddelbuettel <edd@debian.org>
27
38 * inst/tinytest/cpp/Vector.cpp (no_op): Suppress compiler warning
Original file line number Diff line number Diff line change 11
2- # # Copyright (C) 2012 - 2016 Dirk Eddelbuettel and Romain Francois
2+ # # Copyright (C) 2012 - 2019 Dirk Eddelbuettel and Romain Francois
33# #
44# # This file is part of Rcpp.
55# #
1818
1919.runThisTest <- Sys.getenv(" RunAllRcppTests" ) == " yes"
2020
21- # # override -- skipping test for now as noisy
22- .runThisTest <- FALSE
23-
24- if (! .runThisTest ) exit_file(" Skipping 'test_embedded_r.R'" )
21+ if (! .runThisTest ) exit_file(" Skipping, set 'RunAllRcppTests=yes' to run." )
2522
2623library(Rcpp )
2724
@@ -31,9 +28,14 @@ expectedVars <- c("foo", "x")
3128
3229# # embeddedR.cpp exposes the function foo, R snippet calls foo
3330newEnv <- new.env(parent = baseenv())
31+
32+ sink(tempfile()) # NB: silencing output
33+
3434sourceCpp(" cpp/embeddedR.cpp" , env = newEnv )
3535expect_equal(ls(newEnv ), expectedVars , msg = " sourcing code in custom env" )
3636
3737# # R snippet in embeddedR2.cpp also contains a call to foo from previous cpp
3838newEnv2 <- new.env(parent = baseenv())
3939expect_error(sourceCpp(" cpp/embeddedR2.cpp" , env = newEnv2 ), ' could not find function "foo"' )
40+
41+ sink(NULL ) # NB: restoring
You can’t perform that action at this time.
0 commit comments