tests/testthat/test-defunct-functions.R

test_that("defunct functions are defunct!", {
    expect_error(reaggregate_interval_rates())
    expect_error(reaggregate_interval_counts())
    expect_error(split_interval_counts())
    expect_error(aggregate_age_counts())
})

test_that("defunct functions give good error messaging!", {
    expect_snapshot(error = TRUE, cnd_class = TRUE, reaggregate_interval_rates())
    expect_snapshot(error = TRUE, cnd_class = TRUE, reaggregate_interval_counts())
    expect_snapshot(error = TRUE, cnd_class = TRUE, split_interval_counts())
    expect_snapshot(error = TRUE, cnd_class = TRUE, aggregate_age_counts())
})

Try the ageutils package in your browser

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

ageutils documentation built on July 2, 2025, 9:08 a.m.