File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -217,13 +217,15 @@ SEXP testNullableIsUsable(const Nullable<NumericMatrix>& M) {
217217 }
218218}
219219
220+ #if R_VERSION > R_Version(4,3,0)
220221// [[Rcpp::export]]
221222String testNullableString (Rcpp::Nullable<Rcpp::String> param = R_NilValue) {
222223 if (param.isNotNull ())
223224 return String (param);
224225 else
225226 return String (" " );
226227}
228+ #endif
227229
228230// [[Rcpp::export]]
229231void messageWrapper (SEXP s) {
Original file line number Diff line number Diff line change @@ -168,9 +168,11 @@ expect_equal( testNullableIsUsable(M), M)
168168# test.NullableIsUsableFalse <- function() {
169169expect_true(is.null(testNullableIsUsable(NULL )))
170170
171- # test.NullableString <- function() {
172- expect_equal(testNullableString(), " " )
173- expect_equal(testNullableString(" blah" ), " blah" )
171+ # # test.NullableString <- function() {
172+ if (getRversion() > " 4.3.0" ) {
173+ expect_equal(testNullableString(), " " )
174+ expect_equal(testNullableString(" blah" ), " blah" )
175+ }
174176
175177# test.bib <- function() {
176178expect_true(nchar(Rcpp ::: bib()) > 0 , info = " bib file" )
You can’t perform that action at this time.
0 commit comments