tests/testthat/test-buffer.R

context("buffer")

test_that("whole grain buffers work", {
  expect_identical(buffer_extent(extent(lux), 10) %>% as_double(), c(0, 10, 40, 60))
  expect_equal(buffer_extent(extent(lux), 10) %>% as_integer(), c(0, 10, 40, 60))
  
})

Try the spex package in your browser

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

spex documentation built on June 8, 2018, 1:14 a.m.