diff options
-rw-r--r-- | tests/testthat/print_multistart_biphasic.txt | 4 | ||||
-rw-r--r-- | tests/testthat/test_multistart.R | 15 |
2 files changed, 19 insertions, 0 deletions
diff --git a/tests/testthat/print_multistart_biphasic.txt b/tests/testthat/print_multistart_biphasic.txt new file mode 100644 index 00000000..b4344f22 --- /dev/null +++ b/tests/testthat/print_multistart_biphasic.txt @@ -0,0 +1,4 @@ +<multistart> object with 8 fits: +OK + 8 +OK: Fit terminated successfully diff --git a/tests/testthat/test_multistart.R b/tests/testthat/test_multistart.R new file mode 100644 index 00000000..04f08aa7 --- /dev/null +++ b/tests/testthat/test_multistart.R @@ -0,0 +1,15 @@ +test_that("multistart works for saem.mmix models", { + saem_biphasic_m_multi <- multistart(saem_biphasic_m, n = 8, + cores = n_cores) + expect_known_output(print(saem_biphasic_m_multi), + file = "print_multistart_biphasic.txt") + + skip_on_cran() + + llhist_biphasic <- function() llhist(saem_biphasic_m_multi) + parhist_biphasic <- function() parhist(saem_biphasic_m_multi, + ylim = c(0.5, 2)) + + vdiffr::expect_doppelganger("llhist for biphasic saemix fit", llhist_biphasic) + vdiffr::expect_doppelganger("parhist for biphasic saemix fit", parhist_biphasic) +}) |