tests/testthat/test-internal.R

test_that("set_class", {
  expect_s3_class(set_class(1, "thingy"), "thingy")
})

test_that("set_attr", {
  expect_identical(attr(set_attr(1, "added", 5), "added"), 5)
})

Try the dttr2 package in your browser

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

dttr2 documentation built on Nov. 14, 2023, 5:10 p.m.