tests/testthat/test-function-add_attributes.R

test_that("add_attributes() works", {

  f <- kwb.dwd:::add_attributes

  expect_error(f())

  expect_identical(f(1, list()), 1)
  expect_identical(f(1, list(a = 1)), structure(1, a = 1))
})
KWB-R/kwb.dwd documentation built on Sept. 28, 2022, 6:03 p.m.