diff --git a/tests/testthat/test-helpers.R b/tests/testthat/test-helpers.R index 601561a1..7d05e736 100644 --- a/tests/testthat/test-helpers.R +++ b/tests/testthat/test-helpers.R @@ -27,6 +27,14 @@ test_that("update_chain_stat works correctly", { ), stat_latest + pmin(1, n_offspring) ) + expect_error( + .update_chain_stat( + stat_type = "foo", + stat_latest = stat_latest, + n_offspring = n_offspring + ), + "stat_type must be 'size' or 'length'" + ) }) test_that("get_statistic_func works correctly", { @@ -38,4 +46,8 @@ test_that("get_statistic_func works correctly", { .get_statistic_func(chain_statistic = "length"), rgen_length ) + expect_error( + .get_statistic_func(chain_statistic = "foo"), + "chain_statistic must be 'size' or 'length'" + ) })