tests/testthat/test_getAttributeNames.R

context("getAttributeNames")

test_that("getAttributeNames", {
  x = 1:10
  expect_true(is.null(getAttributeNames(x)))

  attr(x, "size") = length(x)
  expect_equal(getAttributeNames(x), c("size"))
})

Try the BBmisc package in your browser

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

BBmisc documentation built on Sept. 29, 2022, 5:12 p.m.