Skip to content

Commit

Permalink
Update tests and docs
Browse files Browse the repository at this point in the history
  • Loading branch information
mhesselbarth committed Dec 18, 2023
1 parent a5f778f commit 68c9782
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 13 deletions.
15 changes: 2 additions & 13 deletions man/compute_statistics.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions tests/testthat/test-reconstruct_pattern_multi.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ multi_recon <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 3, max_
multi_recon_simple <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 100,
verbose = FALSE)

multi_recon_fun <- reconstruct_pattern_multi(marked_pattern, n_repetitions = 1, max_steps = 100,
verbose = FALSE, w_statistics = c("Dk" = 1, "K" = 0.5, "Hs" = 0.5, "pcf" = 1),
divisor = "d", kernel = "gaussian")

################################################################################

testthat::test_that("Output is a long as n_random for reconstruct_pattern_multi", {
Expand Down Expand Up @@ -51,3 +55,16 @@ testthat::test_that("Energy decresead for for reconstruct_pattern_multi", {
testthat::expect_lt(object = multi_recon_simple$energy_current,
expected = multi_recon_simple$energy_launch)
})

testthat::test_that("Test additional arguments of reconstruct_pattern_multi", {

expect_equal(object = multi_recon_fun$Parameter_setting$w_statistics,
expected = c("Dk" = 1, "K" = 0.5, "Hs" = 0.5, "pcf" = 1))

expect_equal(object = multi_recon_fun$Parameter_setting$divisor,
expected = "d")

expect_equal(object = multi_recon_fun$Parameter_setting$kernel_arg,
expected = "gaussian")

})

0 comments on commit 68c9782

Please sign in to comment.