tests/testthat/test-is.empty.R

context("is.empty")

test_that("'is.empty' does the job", {
  expect_true(!is.empty(4) &&
                is.empty(c()) && 
                is.empty(character(0)) && 
                is.empty(list()) &&
                is.empty(integer(0)) &&
                is.empty(data.frame()))
})

Try the bazar package in your browser

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

bazar documentation built on May 2, 2019, 7:02 a.m.