tests/testthat/test-function-hsRestoreAttributes.R

test_that("hsRestoreAttributes() works", {
  
  x <- structure(1, a = 2, b = 3)
  
  y <- hsRestoreAttributes(c(0, x), attributes(x))

  expect_identical(attributes(y), attributes(x))
})
KWB-R/kwb.utils documentation built on April 1, 2024, 7:12 a.m.