tests/testthat/test-parameters.R

test_that("compute_mean_density_hex() works", {

  testthat::expect_snapshot(compute_mean_density_hex(model_2d = scurve_model_obj$model_2d,
                                                     b1 = 4))

})


test_that("find_low_dens_hex() works", {

  testthat::expect_snapshot(find_low_dens_hex(model_2d = scurve_model_obj$model_2d,
                                              b1 = 4,
                                              benchmark_mean_dens = 0.05))

  testthat::expect_snapshot(find_low_dens_hex(model_2d = scurve_model_obj$model_2d,
                                              b1 = 4,
                                              benchmark_mean_dens = 0.1))

  testthat::expect_error(find_low_dens_hex(model_2d = scurve_model_obj$model_2d,
                                           b1 = NA,
                                           benchmark_mean_dens = 0.05))

})

Try the quollr package in your browser

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

quollr documentation built on Aug. 8, 2025, 6:08 p.m.