Running 'testthat.R' [15s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > # This file is part of the standard setup for testthat.
  > # It is recommended that you do not modify it.
  > #
  > # Where should you do additional test configuration?
  > # Learn more about the roles of various files in:
  > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
  > # * https://testthat.r-lib.org/articles/special-files.html
  > 
  > library(testthat)
  > library(GeoThinneR)
  > 
  > test_check("GeoThinneR")
  Saving _problems/test-grid_thinning-8.R
  Saving _problems/test-grid_thinning-15.R
  terra 1.8.86
  
  Attaching package: 'terra'
  
  The following objects are masked from 'package:testthat':
  
      compare, describe
  
  Saving _problems/test-grid_thinning-32.R
  Saving _problems/test-grid_thinning-39.R
  Saving _problems/test-grid_thinning-56.R
  Starting spatial thinning at 2025-12-29 22:23:44 
  Thinning using method: distance 
  Thinning process completed.
  Total execution time: 0.09 seconds
  Saving _problems/test-thin_points-46.R
  [ FAIL 6 | WARN 6 | SKIP 0 | PASS 99 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-grid_thinning.R:8:3'): grid_thinning works with thin_dist ──────
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. └─GeoThinneR::grid_thinning(...) at test-grid_thinning.R:8:3
   2.   ├─terra::rast(...)
   3.   └─terra::rast(...)
   4.     └─terra (local) .local(x = x, ...)
   5.       └─terra:::new_rast(...)
   6.         └─terra:::messages(r, "rast")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-grid_thinning.R:15:3'): grid_thinning works with resolution ────
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. └─GeoThinneR::grid_thinning(...) at test-grid_thinning.R:15:3
   2.   ├─terra::rast(...)
   3.   └─terra::rast(...)
   4.     └─terra (local) .local(x = x, ...)
   5.       └─terra:::new_rast(...)
   6.         └─terra:::messages(r, "rast")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-grid_thinning.R:32:3'): grid_thinning returns multiple trials when all_trials = TRUE ──
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. └─GeoThinneR::grid_thinning(...) at test-grid_thinning.R:32:3
   2.   ├─terra::rast(...)
   3.   └─terra::rast(...)
   4.     └─terra (local) .local(x = x, ...)
   5.       └─terra:::new_rast(...)
   6.         └─terra:::messages(r, "rast")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-grid_thinning.R:39:3'): grid_thinning works with priority ──────
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. └─GeoThinneR::grid_thinning(...) at test-grid_thinning.R:39:3
   2.   ├─terra::rast(...)
   3.   └─terra::rast(...)
   4.     └─terra (local) .local(x = x, ...)
   5.       └─terra:::new_rast(...)
   6.         └─terra:::messages(r, "rast")
   7.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-grid_thinning.R:56:3'): grid_thinning invalid input ────────────
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. ├─testthat::expect_warning(...) at test-grid_thinning.R:56:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─GeoThinneR::grid_thinning(...)
    8.   ├─terra::rast(...)
    9.   └─terra::rast(...)
   10.     └─terra (local) .local(x = x, ...)
   11.       └─terra:::new_rast(...)
   12.         └─terra:::messages(r, "rast")
   13.           └─terra:::error(f, x@pntr$getError())
  ── Error ('test-thin_points.R:46:3'): thin_points works with grid thinning ─────
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. └─GeoThinneR::thin_points(...) at test-thin_points.R:46:3
   2.   └─GeoThinneR (local) perform_thinning(data)
   3.     └─GeoThinneR::grid_thinning(...)
   4.       ├─terra::rast(...)
   5.       └─terra::rast(...)
   6.         └─terra (local) .local(x = x, ...)
   7.           └─terra:::new_rast(...)
   8.             └─terra:::messages(r, "rast")
   9.               └─terra:::error(f, x@pntr$getError())
  
  [ FAIL 6 | WARN 6 | SKIP 0 | PASS 99 ]
  Error:
  ! Test failures.
  Execution halted