Skip to content

Commit

Permalink
Merge pull request #274 from R-Lum/snapshot_analyse_baSAR
Browse files Browse the repository at this point in the history
Add a snapshot test for analyse_baSAR() [skip ci]
  • Loading branch information
mcol authored Sep 30, 2024
2 parents 66c2a8c + 77b16b9 commit df54d9b
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions tests/testthat/test_analyse_baSAR.R
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ test_that("Full check of analyse_baSAR function", {
##please not that the here selected parameters are
##chosen for performance, not for reliability
SW({
results <- suppressWarnings(analyse_baSAR(
expect_snapshot_RLum(results <- suppressWarnings(analyse_baSAR(
object = CWOSL.sub,
source_doserate = c(0.04, 0.001),
signal.integral = c(1:2),
Expand All @@ -170,15 +170,10 @@ test_that("Full check of analyse_baSAR function", {
verbose = TRUE,
n.MCMC = 100,
txtProgressBar = TRUE
))
)),
tolerance = 1.5e-6)
})

expect_s4_class(results, class = "RLum.Results")
expect_s3_class(results$summary, "data.frame")
expect_s3_class(results$mcmc, "mcmc.list")
expect_type(results$models, "list")
expect_type(round(sum(results$summary[, c(6:9)]), 2),type = "double")

## rerun with previous results as input
SW({
results2 <- analyse_baSAR(
Expand Down

0 comments on commit df54d9b

Please sign in to comment.