Running 'testthat.R' [74s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # check if on Fedora
  > os_name <- utils::sessionInfo()$running
  > is_fedora <- TRUE
  > if (
  +   is.character(os_name) &&
  +   identical(length(os_name), 1L) &&
  +   all(!is.na(os_name))
  + ) {
  +   is_fedora <- any(grepl("fedora", tolower(os_name), fixed = TRUE))
  + }
  > 
  > # run tests (but not on Fedora systems)
  > if (isTRUE(is_fedora)) {
  +   message("skipping tests on Fedora system")
  + } else {
  +   ## load packages
  +   library(testthat)
  +   library(raptr)
  + 
  +   ## enable parallel testing
  +   Sys.unsetenv("R_TESTS")
  + 
  +   ## determine reporter
  +   if (identical(Sys.getenv("CI"), "true")) {
  +     reporter <- "progress"
  +   } else {
  +     reporter <- testthat::check_reporter()
  +   }
  + 
  +   ## run tests
  +   test_check("raptr", reporter = reporter)
  + }
  Loading required package: sf
  Linking to GEOS 3.11.1, GDAL 3.6.2, PROJ 9.1.1; sf_use_s2() is TRUE
  Loading required package: terra
  terra 1.7.18
  
  Attaching package: 'terra'
  
  The following objects are masked from 'package:testthat':
  
      compare, describe
  
  [ FAIL 3 | WARN 0 | SKIP 22 | PASS 276 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (4)
  • gurobi cannot be loaded (18)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-11-RapUnsolved.R:100:3'): maximum.targets (reliable) ───────────
  <std::bad_alloc/C++Error/error/condition>
  Error: std::bad_alloc
  Backtrace:
      ▆
   1. ├─raptr::maximum.targets(sim_ru) at test-11-RapUnsolved.R:100:2
   2. └─raptr:::maximum.targets.RapUnsolOrSol(sim_ru)
   3.   └─raptr:::rcpp_generate_model_object(...)
  ── Error ('test-13-rap.R:7:3'): rap (unreliable - default RapOpts and GurobiOpts - solve=FALSE) ──
  Error: cannot allocate vector of size 1.4 Mb
  Backtrace:
       ▆
    1. └─raptr::rap(...) at test-13-rap.R:7:2
    2.   ├─raptr::RapUnsolved(...)
    3.   │ └─methods::new("RapUnsolved", opts = opts, data = data)
    4.   │   ├─methods::initialize(value, ...)
    5.   │   └─methods::initialize(value, ...)
    6.   ├─base::do.call(...)
    7.   └─raptr (local) `<fn>`(...)
    8.     └─raptr::make.DemandPoints(...)
    9.       └─raptr:::demand.points.density2d(...)
   10.         └─ks::kde(pts, eval.points = dp, ...)
   11.           └─ks::Hpi(...)
   12.             └─ks:::psifun2(...)
   13.               └─ks::kfe(...)
   14.                 └─ks:::dmvnorm.deriv.sum(...)
   15.                   └─ks:::kdde.binned(...)
   16.                     └─ks:::kdde.binned.nd(...)
   17.                       └─ks:::dmvnorm.deriv(...)
   18.                         ├─base::do.call(...)
   19.                         └─ks:::dmvnorm.deriv.unique(...)
   20.                           └─base::cbind(hmnew, hmnew.aux)
  ── Error ('test-13-rap.R:45:3'): rap (unreliable - default RapOpts and GurobiOpts and sparse occupancy - solve=FALSE) ──
  Error: cannot allocate vector of size 18.9 Mb
  Backtrace:
       ▆
    1. └─raptr::rap(...) at test-13-rap.R:45:2
    2.   ├─raptr::RapUnsolved(...)
    3.   │ └─methods::new("RapUnsolved", opts = opts, data = data)
    4.   │   ├─methods::initialize(value, ...)
    5.   │   └─methods::initialize(value, ...)
    6.   ├─base::do.call(...)
    7.   └─raptr (local) `<fn>`(...)
    8.     └─raptr::make.DemandPoints(...)
    9.       └─raptr:::demand.points.density2d(...)
   10.         └─ks::kde(pts, eval.points = dp, ...)
   11.           └─ks::Hpi(...)
   12.             └─ks:::psifun2(...)
   13.               └─ks::kfe(...)
   14.                 └─ks:::dmvnorm.deriv.sum(...)
   15.                   └─ks:::kdde.binned(...)
   16.                     └─ks:::kdde.binned.nd(...)
   17.                       └─ks:::dmvnorm.deriv(...)
   18.                         ├─base::do.call(...)
   19.                         └─ks:::dmvnorm.deriv.unique(...)
   20.                           └─base::matrix(rep((-1)^rowSums(dind), n), nrow = n, byrow = TRUE)
  
  [ FAIL 3 | WARN 0 | SKIP 22 | PASS 276 ]
  Error: Test failures
  Execution halted