tests/testthat/test-internalFunctions.R

context("internal functions")

terra <- rast(ncol = 5, nrow=5, vals = 1)

sf <- readRDS(system.file("external/trainingPolygons_lsat.rds", package="RStoolbox"))

test_that("Loaded as sf", {
    expect_is(sf, c("sf", "data.frame"))
})


test_that(".canProcInMem says no", {
  expect_true(.canProcInMem(terra,1))
  expect_false(.canProcInMem(terra,1e20))
})

Try the RStoolbox package in your browser

Any scripts or data that you put into this service are public.

RStoolbox documentation built on May 29, 2024, 6:34 a.m.