diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-25 23:26:21 +0200 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2022-10-25 23:26:21 +0200 |
commit | 4030a3083d7ca51bc5d606dd95a877fb00967003 (patch) | |
tree | 419051a8d03b5255cc37e29afc2916b5024c282a /tests/testthat | |
parent | e87e3677554b8845209b8d71d0ab7faca7951943 (diff) |
Test multistart method
Diffstat (limited to 'tests/testthat')
-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) +}) |