tests/testthat/test-declare.R

context("declare")

test_that("declare", {
  expect_true({
    declare(x,y)
    all(vapply(list(x,y),is.null,logical(1L)))
  })
  expect_identical({
    declare(x,y=numeric(),z=1:3)
    list(x,y,z)
  },list(NULL,numeric(),1:3))
})

Try the rtype package in your browser

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

rtype documentation built on May 2, 2019, 12:21 p.m.