tests/testthat/test_x3p_crop.R

context("x3p_crop")


test_that("x3p_crop works as expected", {
  expect_silent(tmp <- x3ptest_mask %>% x3p_crop(width=4,height=4))
  
  expect_equivalent(
    tmp$surface.matrix,
    x3ptest_mask$surface.matrix[1:4,3:6]
  )
})

Try the x3ptools package in your browser

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

x3ptools documentation built on Nov. 27, 2021, 1:06 a.m.