tests/testthat/test_demolandscape.R

context("demo_landscape")


test_that("whether the demo gives the same output", {

  set.seed(159)

  demo_raster <- .demo_landscape(2000:2005, res = 1)

  expect_equal(c(class(demo_raster[[1]])), "RasterLayer")

  expect_equal(length(demo_raster), 6)


})

Try the OpenLand package in your browser

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

OpenLand documentation built on Nov. 2, 2021, 9:13 a.m.