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 35c4117 commit 5f77fb4
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 5f77fb4

Please sign in to comment.