Running 'testthat.R' [20s]
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(rcrisp)
  > 
  > test_check("rcrisp")
  Ran 1/1 deferred expressions
  Saving _problems/test-cache-81.R
  Saving _problems/test-cache-90.R
  Linking to GEOS 3.13.0, GDAL 3.10.1, PROJ 9.5.1; sf_use_s2() is TRUE
  Saving _problems/test-delineate-4.R
  Saving _problems/test-utils-192.R
  Saving _problems/test-utils-266.R
  Saving _problems/test-utils-305.R
  Calculating viewpoints from both river edge and river centerline.
  Saving _problems/test-valley-46.R
  Saving _problems/test-valley-79.R
  Saving _problems/test-valley-110.R
  [ FAIL 9 | WARN 9 | SKIP 6 | PASS 178 ]
  
  ══ Skipped tests (6) ═══════════════════════════════════════════════════════════
  • On CRAN (5): 'test-autotest.R:3:3', 'test-corridor.R:147:3',
    'test-network.R:337:3', 'test-riverspace.R:3:3', 'test-valley.R:17:3'
  • Skipping extended test (1): 'test-extended.R:9:3'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-cache.R:81:3'): Cached objects can be properly read ────────────
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. └─rcrisp:::read_data_from_cache(filepath, unwrap = TRUE, quiet = TRUE) at test-cache.R:81:3
    2.   ├─terra::unwrap(data)
    3.   └─terra::unwrap(data)
    4.     └─terra (local) .local(x, ...)
    5.       ├─base::eval(parse(text = x@definition))
    6.       │ └─base::eval(parse(text = x@definition))
    7.       ├─terra::rast(...)
    8.       └─terra::rast(...)
    9.         └─terra (local) .local(x = x, ...)
   10.           └─terra:::new_rast(...)
   11.             └─terra:::messages(r, "rast")
   12.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test-cache.R:89:3'): Objects can be properly saved to cache ─────────
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. ├─terra::rast(...) at test-cache.R:89:3
   2. └─terra::rast(...)
   3.   └─terra (local) .local(x = x, ...)
   4.     └─terra:::new_rast(...)
   5.       └─terra:::messages(r, "rast")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-delineate.R:2:1'): (code run outside of `test_that()`) ─────────
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. └─rcrisp:::get_test_dem_valley(...) at test-delineate.R:2:1
    2.   ├─terra::crs(sf::st_crs(river)$input) at ./helper-valley.R:15:3
    3.   └─terra::crs(sf::st_crs(river)$input)
    4.     └─terra (local) .local(x, ...)
    5.       ├─terra::rast(crs = x)
    6.       └─terra::rast(crs = x)
    7.         └─terra (local) .local(x = x, ...)
    8.           └─terra:::new_rast(...)
    9.             └─terra:::messages(r, "rast")
   10.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test-utils.R:191:3'): reproject works with raster data ──────────────
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. ├─terra::rast(...) at test-utils.R:191:3
   2. └─terra::rast(...)
   3.   └─terra (local) .local(x = x, ...)
   4.     └─terra:::new_rast(...)
   5.       └─terra:::messages(r, "rast")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-utils.R:265:13'): the original coorindates of a raster can be recovered after
            reprojection within reasonable numeric tolerance ──
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. ├─terra::rast(...) at test-utils.R:265:13
   2. └─terra::rast(...)
   3.   └─terra (local) .local(x = x, ...)
   4.     └─terra:::new_rast(...)
   5.       └─terra:::messages(r, "rast")
   6.         └─terra:::error(f, x@pntr$getError())
  ── Error ('test-utils.R:304:5'): load_raster correctly retrieve and merge local data ──
  Error: [rast] empty srs
  Backtrace:
      ▆
   1. ├─withr::with_file(...) at test-utils.R:312:3
   2. │ └─withr:::names2(file)
   3. └─rcrisp (local) write_local_raster("r1.tif", 1, 4, 1, 4)
   4.   ├─terra::rast(...) at test-utils.R:304:5
   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())
  ── Error ('test-valley.R:46:3'): Download DEM data can be retrieved from the cache on new calls ──
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. └─rcrisp:::get_test_dem_valley(river) at test-valley.R:46:3
    2.   ├─terra::crs(sf::st_crs(river)$input) at ./helper-valley.R:15:3
    3.   └─terra::crs(sf::st_crs(river)$input)
    4.     └─terra (local) .local(x, ...)
    5.       ├─terra::rast(crs = x)
    6.       └─terra::rast(crs = x)
    7.         └─terra (local) .local(x = x, ...)
    8.           └─terra:::new_rast(...)
    9.             └─terra:::messages(r, "rast")
   10.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test-valley.R:76:3'): valley polygon is correctly constructed ───────
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. └─rcrisp:::get_test_dem_valley(...) at test-valley.R:76:3
    2.   ├─terra::crs(sf::st_crs(river)$input) at ./helper-valley.R:15:3
    3.   └─terra::crs(sf::st_crs(river)$input)
    4.     └─terra (local) .local(x, ...)
    5.       ├─terra::rast(crs = x)
    6.       └─terra::rast(crs = x)
    7.         └─terra (local) .local(x = x, ...)
    8.           └─terra:::new_rast(...)
    9.             └─terra:::messages(r, "rast")
   10.               └─terra:::error(f, x@pntr$getError())
  ── Error ('test-valley.R:110:3'): Mismatch between DEM CRS and river CRS throws error ──
  Error: [rast] empty srs
  Backtrace:
       ▆
    1. └─rcrisp:::get_test_dem_valley(river) at test-valley.R:110:3
    2.   ├─terra::crs(sf::st_crs(river)$input) at ./helper-valley.R:15:3
    3.   └─terra::crs(sf::st_crs(river)$input)
    4.     └─terra (local) .local(x, ...)
    5.       ├─terra::rast(crs = x)
    6.       └─terra::rast(crs = x)
    7.         └─terra (local) .local(x = x, ...)
    8.           └─terra:::new_rast(...)
    9.             └─terra:::messages(r, "rast")
   10.               └─terra:::error(f, x@pntr$getError())
  
  [ FAIL 9 | WARN 9 | SKIP 6 | PASS 178 ]
  Error:
  ! Test failures.
  Execution halted