aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/test_plot.R
diff options
context:
space:
mode:
authorJohannes Ranke <jranke@uni-bremen.de>2020-12-09 09:22:25 +0100
committerJohannes Ranke <jranke@uni-bremen.de>2020-12-09 09:22:25 +0100
commitc51fe964d66303f531d6b593b6fe46bdfacb13b4 (patch)
tree5a1474bb46c285e690f9afbcafb3ca48ec59c88f /tests/testthat/test_plot.R
parent0517ca6179d3c4bc35cc7edcfd5de3d98aa4fd64 (diff)
Some more tests that may work on travis now
Diffstat (limited to 'tests/testthat/test_plot.R')
-rw-r--r--tests/testthat/test_plot.R42
1 files changed, 25 insertions, 17 deletions
diff --git a/tests/testthat/test_plot.R b/tests/testthat/test_plot.R
index c7eaf428..bafcd561 100644
--- a/tests/testthat/test_plot.R
+++ b/tests/testthat/test_plot.R
@@ -12,19 +12,8 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", {
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_biphasic_mmkin <- function() plot(mixed(mmkin_biphasic))
- plot_biphasic_nlme <- function() plot(nlme_biphasic)
- plot_biphasic_saem_s <- function() plot(saem_biphasic_s)
- plot_biphasic_saem_m <- function() plot(saem_biphasic_m)
-
- 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)
- plot_errmod_fit_tc_1 <- function() plot_err(fit_tc_1, sep_obs = FALSE)
skip_if(getRversion() >= "4.1.0")
vdiffr::expect_doppelganger("mkinfit plot for FOCUS C with defaults", plot_default_FOCUS_C_SFO)
@@ -36,16 +25,35 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", {
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 C tc", plot_errmod_fit_C_tc)
- skip_on_travis() # Still not working on Travis, maybe because of deSolve producing
+
+ plot_res_sfo_sfo <- function() plot_res(f_sfo_sfo_desolve)
+ vdiffr::expect_doppelganger("plot_res for FOCUS D", plot_res_sfo_sfo)
+
+ plot_err_sfo_sfo <- function() plot_err(f_sfo_sfo_desolve)
+ vdiffr::expect_doppelganger("plot_err for FOCUS D", plot_err_sfo_sfo)
+
+ plot_errmod_fit_obs_1 <- function() plot_err(fit_obs_1, sep_obs = FALSE)
+ vdiffr::expect_doppelganger("plot_errmod with SFO_lin_a_tc", plot_errmod_fit_tc_1)
+
+ plot_errmod_fit_tc_1 <- function() plot_err(fit_tc_1, sep_obs = FALSE)
+ vdiffr::expect_doppelganger("plot_errmod with SFO_lin_a_obs", plot_errmod_fit_obs_1)
+
+ skip_on_travis()
+
+ # Biphasic fits with lots of data and fits have lots of potential for differences
+ plot_biphasic_mmkin <- function() plot(mixed(mmkin_biphasic))
+ plot_biphasic_nlme <- function() plot(nlme_biphasic)
+ plot_biphasic_saem_s <- function() plot(saem_biphasic_s)
+ plot_biphasic_saem_m <- function() plot(saem_biphasic_m)
+
vdiffr::expect_doppelganger("mixed model fit for mmkin object", plot_biphasic_mmkin)
vdiffr::expect_doppelganger("mixed model fit for nlme object", plot_biphasic_nlme)
vdiffr::expect_doppelganger("mixed model fit for saem object with saemix transformations", plot_biphasic_saem_s)
vdiffr::expect_doppelganger("mixed model fit for saem object with mkin transformations", plot_biphasic_saem_m)
- # different results when not working with a compiled model or eigenvalues
+
+ # different results when working with eigenvalues
+ plot_errmod_fit_D_obs_eigen <- function() plot_err(fit_D_obs_eigen, sep_obs = FALSE)
vdiffr::expect_doppelganger("plot_errmod with FOCUS D obs eigen", plot_errmod_fit_D_obs_eigen)
- 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)
- vdiffr::expect_doppelganger("plot_errmod with SFO_lin_a_obs", plot_errmod_fit_obs_1)
+
})

Contact - Imprint