Skip to content

Commit

Permalink
add deprecation tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sbfnk committed Sep 18, 2023
1 parent 846741b commit 6f8e23e
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/testthat/test-delays.R
Original file line number Diff line number Diff line change
Expand Up @@ -104,3 +104,36 @@ test_that("contradictory delays are caught", {
"must be 0"
)
})

test_that("deprecated arguments are caught", {
expect_warning(
test_stan_delays(
generation_time = generation_time_opts(mean = 3),
params = delay_params
), "deprecated"
)
expect_error(
test_stan_delays(
delays = delay_opts(mean = 3),
params = delay_params
), "named arguments"
)
expect_warning(
test_stan_delays(
delays = delay_opts(list(mean = 3)),
params = delay_params
), "deprecated"
)
expect_warning(
test_stan_delays(
delays = delay_opts(list(mean = 3)),
params = delay_params
), "deprecated"
)
expect_warning(
test_stan_delays(
delays = trunc_opts(list(mean = 3)),
params = delay_params
), "deprecated"
)
})

0 comments on commit 6f8e23e

Please sign in to comment.