aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/test_plots_summary_twa.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-04-09 10:35:59 +0200
committerJohannes Ranke <jranke@uni-bremen.de>2020-04-09 10:35:59 +0200
commite4e54169ab3961c354f580bc489d150299038367 (patch)
tree293790e7db06d0d808ceabc69ee4711294d928b6 /tests/testthat/test_plots_summary_twa.R
parent23461dddcc6a1858f1c9c9052512f22485d08842 (diff)
Improve test coverage and fix nlme test
No idea why I had to do more assignments all of a sudden in test_nlme.R
Diffstat (limited to 'tests/testthat/test_plots_summary_twa.R')
-rw-r--r--tests/testthat/test_plots_summary_twa.R10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/testthat/test_plots_summary_twa.R b/tests/testthat/test_plots_summary_twa.R
index 77144665..c04192c1 100644
--- a/tests/testthat/test_plots_summary_twa.R
+++ b/tests/testthat/test_plots_summary_twa.R
@@ -99,6 +99,12 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", {
mkinerrplot_FOCUS_C_SFO <- function() mkinerrplot(fits[["SFO", "FOCUS_C"]])
mmkin_FOCUS_C <- function() plot(fits[, "FOCUS_C"])
mmkin_SFO <- function() plot(fits["SFO",])
+ fit_D_obs_eigen <- suppressWarnings(mkinfit(SFO_SFO, FOCUS_2006_D, error_model = "obs", quiet = TRUE))
+ fit_C_tc <- mkinfit("SFO", FOCUS_2006_C, error_model = "tc", quiet = TRUE)
+
+ plot_errmod_fit_D_obs_eigen <- function() plot_err(fit_D_obs_eigen, sep_obs = FALSE)
+ plot_errmod_fit_C_tc <- function() plot_err(fit_C_tc)
+
plot_res_sfo_sfo <- function() plot_res(f_sfo_sfo_desolve)
plot_err_sfo_sfo <- function() plot_err(f_sfo_sfo_desolve)
plot_errmod_fit_obs_1 <- function() plot_err(fit_obs_1, sep_obs = FALSE)
@@ -111,6 +117,10 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", {
vdiffr::expect_doppelganger("mkinerrplot for FOCUS C SFO", mkinerrplot_FOCUS_C_SFO)
vdiffr::expect_doppelganger("mmkin plot for FOCUS C", mmkin_FOCUS_C)
vdiffr::expect_doppelganger("mmkin plot for SFO (FOCUS C and D)", mmkin_SFO)
+ vdiffr::expect_doppelganger("plot_errmod with FOCUS D obs eigen", plot_errmod_fit_D_obs_eigen)
+ vdiffr::expect_doppelganger("plot_errmod with FOCUS C tc", plot_errmod_fit_C_tc)
+ skip_on_travis() # Still not working on Travis, presumably because of deSolve producing
+ # different results when not working with a compiled model
vdiffr::expect_doppelganger("plot_res for FOCUS D", plot_res_sfo_sfo)
vdiffr::expect_doppelganger("plot_err for FOCUS D", plot_err_sfo_sfo)
vdiffr::expect_doppelganger("plot_errmod with SFO_lin_a_tc", plot_errmod_fit_tc_1)

Contact - Imprint