Running 'testthat.R' [8s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > Sys.setenv("R_TESTS" = "")
  > library(testthat)
  > library(RcppXPtrUtils)
  > test_check("RcppXPtrUtils")
  
  Generated code for function definition: 
  --------------------------------------------------------
  
  #include <Rcpp.h>
  
  using namespace Rcpp;
  
  // [[Rcpp::export]]
  
    NumericVector execute_cpp(SEXP func_, int n, double l) {
      typedef SEXP (*funcPtr)(int, double);
      funcPtr func = *XPtr<funcPtr>(func_);
      return func(n, l);
    }
  
  Generated extern "C" functions 
  --------------------------------------------------------
  
  
  #include <Rcpp.h>
  #ifdef RCPP_USE_GLOBAL_ROSTREAM
  Rcpp::Rostream<true>&  Rcpp::Rcout = Rcpp::Rcpp_cout_get();
  Rcpp::Rostream<false>& Rcpp::Rcerr = Rcpp::Rcpp_cerr_get();
  #endif
  
  // execute_cpp
  NumericVector execute_cpp(SEXP func_, int n, double l);
  RcppExport SEXP sourceCpp_1_execute_cpp(SEXP func_SEXP, SEXP nSEXP, SEXP lSEXP) {
  BEGIN_RCPP
      Rcpp::RObject rcpp_result_gen;
      Rcpp::RNGScope rcpp_rngScope_gen;
      Rcpp::traits::input_parameter< SEXP >::type func_(func_SEXP);
      Rcpp::traits::input_parameter< int >::type n(nSEXP);
      Rcpp::traits::input_parameter< double >::type l(lSEXP);
      rcpp_result_gen = Rcpp::wrap(execute_cpp(func_, n, l));
      return rcpp_result_gen;
  END_RCPP
  }
  
  Generated R functions 
  -------------------------------------------------------
  
  `.sourceCpp_1_DLLInfo` <- dyn.load('D:/temp/2026_04_17_01_50_00_1722/Rtmpsrlxt6/sourceCpp-x86_64-w64-mingw32-1.1.1/sourcecpp_e914314c4e1a/sourceCpp_2.dll')
  
  execute_cpp <- Rcpp:::sourceCppFunction(function(func_, n, l) {}, FALSE, `.sourceCpp_1_DLLInfo`, 'sourceCpp_1_execute_cpp')
  
  rm(`.sourceCpp_1_DLLInfo`)
  
  Building shared library
  --------------------------------------------------------
  
  DIR: D:/temp/2026_04_17_01_50_00_1722/Rtmpsrlxt6/sourceCpp-x86_64-w64-mingw32-1.1.1/sourcecpp_e914314c4e1a
  
  D:/RCompile/recent/R/bin/x64/R CMD SHLIB -o "sourceCpp_2.dll" "filee914439b231.cpp" 
  using C++ compiler: 'g++.exe (GCC) 14.3.0'
  make[1]: Entering directory '/d/temp/2026_04_17_01_50_00_1722/Rtmpsrlxt6/sourceCpp-x86_64-w64-mingw32-1.1.1/sourcecpp_e914314c4e1a'
  g++ -std=gnu++20  -I"D:/RCompile/recent/R/include" -DNDEBUG   -I"D:/RCompile/CRANpkg/lib/4.6/Rcpp/include" -I"D:/temp/2026_04_17_01_50_00_1722/Rtmpsrlxt6/sourceCpp-x86_64-w64-mingw32-1.1.1"   -I"d:/rtools45/x86_64-w64-mingw32.static.posix/include"      -pedantic -O2 -Wall  -mfpmath=sse -msse2 -mstackrealign    -c filee914439b231.cpp -o filee914439b231.o
  In file included from D:/RCompile/CRANpkg/lib/4.6/Rcpp/include/Rcpp.h:49,
                   from filee914439b231.cpp:1:
  D:/RCompile/CRANpkg/lib/4.6/Rcpp/include/Rcpp/Function.h: In constructor 'Rcpp::Function_Impl<StoragePolicy>::Function_Impl(const std::string&, const std::string&)':
  D:/RCompile/CRANpkg/lib/4.6/Rcpp/include/Rcpp/Function.h:75:65: error: 'R_NamespaceRegistry' was not declared in this scope
     75 |             Shield<SEXP> env(R_getVarEx(Rf_install(ns.c_str()), R_NamespaceRegistry, FALSE, R_UnboundValue));
        |                                                                 ^~~~~~~~~~~~~~~~~~~
  make[1]: *** [D:/RCompile/recent/R/etc/x64/Makeconf:304: filee914439b231.o] Error 1
  make[1]: Leaving directory '/d/temp/2026_04_17_01_50_00_1722/Rtmpsrlxt6/sourceCpp-x86_64-w64-mingw32-1.1.1/sourcecpp_e914314c4e1a'
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 12 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-check.R:3:1'): (code run outside of `test_that()`) ─────────────
  Error in `sourceCpp(code = code, env = env, rebuild = rebuild, cacheDir = cacheDir, showOutput = showOutput, verbose = verbose, echo = echo)`: Error 1 occurred building shared library.
  Backtrace:
      ▆
   1. └─Rcpp::cppFunction(...) at test-check.R:3:1
   2.   └─Rcpp::sourceCpp(...)
  
  [ FAIL 1 | WARN 0 | SKIP 0 | PASS 12 ]
  Error:
  ! Test failures.
  Execution halted