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)
})

Try the cchsflow package in your browser

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

cchsflow documentation built on May 28, 2022, 1:09 a.m.