Skip to content

Commit 2954205

Browse files
committed
Conditioning one test on R 4.5.0 or later
1 parent be4a746 commit 2954205

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

inst/tinytest/test_function.R

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,10 @@ expect_error(function_cons_env("fun_child", parent_env),
7070
# test.Function.cons.ns <- function() {
7171
expect_equal(Rcpp::sourceCpp, function_cons_ns("sourceCpp", "Rcpp"),
7272
info = "namespace-lookup constructor")
73-
expect_error(function_cons_ns("sourceCpp", "Rcppp"),
74-
info = "namespace-lookup constructor: fail when ns does not exist")
73+
if (getRversion() > "4.5.0") {
74+
expect_error(function_cons_ns("sourceCpp", "Rcppp"),
75+
info = "namespace-lookup constructor: fail when ns does not exist")
76+
}
7577
expect_error(function_cons_ns("sourceCppp", "Rcpp"),
7678
info = "namespace-lookup constructor: fail when function not found")
7779

0 commit comments

Comments
 (0)