tests/testthat/test-age-categorical.R

test_that("age_cat_fun performs as expected below lower bound", {
  expect_equal(age_cat_fun(11), "NA(b)")
})

test_that("age_cat_fun performs as expected within bounds", {
  expect_equal(age_cat_fun(33), 6)
})

test_that("age_cat_fun performs as expected above upper bound", {
  expect_equal(age_cat_fun(96), 16)
})
Big-Life-Lab/cchsflow documentation built on June 15, 2025, 11:53 a.m.