From fb9103b56fa583bb9a4370b5fa249e1eacd032c8 Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Thu, 9 Apr 2020 12:40:51 +0200 Subject: Add another visual test for coverage --- tests/figs/plotting/plot-res-for-focus-c.svg | 132 +++++++++++++++++++++++++++ tests/testthat/test_plots_summary_twa.R | 4 +- 2 files changed, 135 insertions(+), 1 deletion(-) create mode 100644 tests/figs/plotting/plot-res-for-focus-c.svg (limited to 'tests') diff --git a/tests/figs/plotting/plot-res-for-focus-c.svg b/tests/figs/plotting/plot-res-for-focus-c.svg new file mode 100644 index 00000000..43b94055 --- /dev/null +++ b/tests/figs/plotting/plot-res-for-focus-c.svg @@ -0,0 +1,132 @@ + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 + + + + + + +0 +20 +40 +60 +80 + + + + + + +Time +Observed + + + + + + + + + + + + + + + + + + +parent + + + + + + + + + + + + + + + + + + +0 +20 +40 +60 +80 +100 +120 + + + + + + +-10 +-5 +0 +5 +10 + + + + + + +Time +Residual + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/testthat/test_plots_summary_twa.R b/tests/testthat/test_plots_summary_twa.R index de3a5fdb..3981bde7 100644 --- a/tests/testthat/test_plots_summary_twa.R +++ b/tests/testthat/test_plots_summary_twa.R @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2019 Johannes Ranke +# Copyright (C) 2016-2020 Johannes Ranke # Contact: jranke@uni-bremen.de # This file is part of the R package mkin @@ -94,6 +94,7 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", { skip_on_cran() plot_default_FOCUS_C_SFO <- function() plot(fits[["SFO", "FOCUS_C"]]) plot_res_FOCUS_C_SFO <- function() plot(fits[["SFO", "FOCUS_C"]], show_residuals = TRUE) + plot_res_FOCUS_C_SFO_2 <- function() plot_res(fits[["SFO", "FOCUS_C"]]) plot_sep_FOCUS_C_SFO <- function() plot_sep(fits[["SFO", "FOCUS_C"]]) mkinparplot_FOCUS_C_SFO <- function() mkinparplot(fits[["SFO", "FOCUS_C"]]) mkinerrplot_FOCUS_C_SFO <- function() mkinerrplot(fits[["SFO", "FOCUS_C"]]) @@ -112,6 +113,7 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", { vdiffr::expect_doppelganger("mkinfit plot for FOCUS C with defaults", plot_default_FOCUS_C_SFO) vdiffr::expect_doppelganger("mkinfit plot for FOCUS C with residuals like in gmkin", plot_res_FOCUS_C_SFO) + vdiffr::expect_doppelganger("plot_res for FOCUS C", plot_res_FOCUS_C_SFO_2) vdiffr::expect_doppelganger("mkinfit plot for FOCUS C with sep = TRUE", plot_sep_FOCUS_C_SFO) vdiffr::expect_doppelganger("mkinparplot for FOCUS C SFO", mkinparplot_FOCUS_C_SFO) vdiffr::expect_doppelganger("mkinerrplot for FOCUS C SFO", mkinerrplot_FOCUS_C_SFO) -- cgit v1.2.1