tests/testthat/test_filterNull.R

context("filterNull")

test_that("filterNull", {
  li = list(1, 2, NULL, 3)
  expect_equal(filterNull(li), list(1, 2, 3))
  expect_equal(filterNull(list()), list())
  expect_error(filterNull(iris))
})
berndbischl/BBmisc documentation built on Nov. 29, 2017, 5:10 a.m.