tests/testthat/test-removecells.R

context("Test for .removeCells")

test_that(".removeCells works fine", {
  
  m_test <- rbind(c(1, 5, 0, 0), c(0, 5, 0, 5))
  
  expect_true(all(dim(.removeCells(m_test)) == c(1, 4)))
  
  expect_error(.removeCells(m_test[, -4]))
  
  expect_true(all(dim(.removeCells(m_test[-1, , drop=FALSE])) == c(1, 4)))
  
  
})

Try the letsR package in your browser

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

letsR documentation built on Nov. 23, 2023, 9:07 a.m.