From 8363b1c179c4e83d97c3c0c4cfa365f92c7832af Mon Sep 17 00:00:00 2001 From: Johannes Ranke Date: Mon, 15 Jun 2020 10:27:19 +0200 Subject: Test plots on r-devel only following the arguments of Xavier Robin https://github.com/r-lib/vdiffr/issues/86#issuecomment-636447231 --- tests/figs/deps.txt | 2 +- .../nafta-sop-appendix-b.svg | 12 +-- .../plot-nafta-analysis.svg | 12 +-- .../figs/plotting/mkinerrplot-for-focus-c-sfo.svg | 2 +- .../mkinfit-plot-for-focus-c-with-defaults.svg | 2 +- ...ot-for-focus-c-with-residuals-like-in-gmkin.svg | 4 +- .../mkinfit-plot-for-focus-c-with-sep-true.svg | 4 +- .../figs/plotting/mkinparplot-for-focus-c-sfo.svg | 4 +- tests/figs/plotting/mmkin-plot-for-focus-c.svg | 16 ++-- .../plotting/mmkin-plot-for-sfo-focus-c-and-d.svg | 8 +- tests/figs/plotting/plot-err-for-focus-d.svg | 86 +++++++++++----------- .../figs/plotting/plot-errmod-with-focus-c-tc.svg | 4 +- .../plot-errmod-with-focus-d-obs-eigen.svg | 86 +++++++++++----------- .../plotting/plot-errmod-with-sfo-lin-a-obs.svg | 56 +++++++------- .../plotting/plot-errmod-with-sfo-lin-a-tc.svg | 56 +++++++------- tests/figs/plotting/plot-res-for-focus-c.svg | 4 +- tests/figs/plotting/plot-res-for-focus-d.svg | 86 +++++++++++----------- tests/testthat/test_nafta.R | 2 + tests/testthat/test_plot.R | 1 + 19 files changed, 225 insertions(+), 222 deletions(-) (limited to 'tests') diff --git a/tests/figs/deps.txt b/tests/figs/deps.txt index 0f64e23e..fa7c5968 100644 --- a/tests/figs/deps.txt +++ b/tests/figs/deps.txt @@ -1,3 +1,3 @@ - vdiffr-svg-engine: 1.0 -- vdiffr: 0.3.1 +- vdiffr: 0.3.2 - freetypeharfbuzz: 0.2.5 diff --git a/tests/figs/evaluations-according-to-2015-nafta-guidance/nafta-sop-appendix-b.svg b/tests/figs/evaluations-according-to-2015-nafta-guidance/nafta-sop-appendix-b.svg index 617e39b3..b3aaee5a 100644 --- a/tests/figs/evaluations-according-to-2015-nafta-guidance/nafta-sop-appendix-b.svg +++ b/tests/figs/evaluations-according-to-2015-nafta-guidance/nafta-sop-appendix-b.svg @@ -40,7 +40,7 @@ 30 40 50 - + @@ -116,7 +116,7 @@ -5 0 5 - + @@ -188,7 +188,7 @@ 30 40 50 - + @@ -264,7 +264,7 @@ -2 0 2 - + @@ -336,7 +336,7 @@ 30 40 50 - + @@ -420,7 +420,7 @@ 1 2 3 - + diff --git a/tests/figs/evaluations-according-to-2015-nafta-guidance/plot-nafta-analysis.svg b/tests/figs/evaluations-according-to-2015-nafta-guidance/plot-nafta-analysis.svg index 5e98487b..74ff25d2 100644 --- a/tests/figs/evaluations-according-to-2015-nafta-guidance/plot-nafta-analysis.svg +++ b/tests/figs/evaluations-according-to-2015-nafta-guidance/plot-nafta-analysis.svg @@ -34,7 +34,7 @@ 60 80 100 - + @@ -112,7 +112,7 @@ 0 10 20 - + @@ -182,7 +182,7 @@ 60 80 100 - + @@ -260,7 +260,7 @@ 0 10 20 - + @@ -330,7 +330,7 @@ 60 80 100 - + @@ -404,7 +404,7 @@ -10 0 10 - + diff --git a/tests/figs/plotting/mkinerrplot-for-focus-c-sfo.svg b/tests/figs/plotting/mkinerrplot-for-focus-c-sfo.svg index 186d4aac..31be7e53 100644 --- a/tests/figs/plotting/mkinerrplot-for-focus-c-sfo.svg +++ b/tests/figs/plotting/mkinerrplot-for-focus-c-sfo.svg @@ -34,7 +34,7 @@ 40 60 80 - + Predicted Squared residual diff --git a/tests/figs/plotting/mkinfit-plot-for-focus-c-with-defaults.svg b/tests/figs/plotting/mkinfit-plot-for-focus-c-with-defaults.svg index 82577502..a157161c 100644 --- a/tests/figs/plotting/mkinfit-plot-for-focus-c-with-defaults.svg +++ b/tests/figs/plotting/mkinfit-plot-for-focus-c-with-defaults.svg @@ -38,7 +38,7 @@ 40 60 80 - + Time Observed diff --git a/tests/figs/plotting/mkinfit-plot-for-focus-c-with-residuals-like-in-gmkin.svg b/tests/figs/plotting/mkinfit-plot-for-focus-c-with-residuals-like-in-gmkin.svg index 8d16bfd3..e16a5260 100644 --- a/tests/figs/plotting/mkinfit-plot-for-focus-c-with-residuals-like-in-gmkin.svg +++ b/tests/figs/plotting/mkinfit-plot-for-focus-c-with-residuals-like-in-gmkin.svg @@ -38,7 +38,7 @@ 40 60 80 - + @@ -101,7 +101,7 @@ 0 5 10 - + diff --git a/tests/figs/plotting/mkinfit-plot-for-focus-c-with-sep-true.svg b/tests/figs/plotting/mkinfit-plot-for-focus-c-with-sep-true.svg index 327161da..3c207187 100644 --- a/tests/figs/plotting/mkinfit-plot-for-focus-c-with-sep-true.svg +++ b/tests/figs/plotting/mkinfit-plot-for-focus-c-with-sep-true.svg @@ -38,7 +38,7 @@ 40 60 80 - + @@ -112,7 +112,7 @@ 0 5 10 - + diff --git a/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg b/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg index 62590397..4c2f2b7b 100644 --- a/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg +++ b/tests/figs/plotting/mkinparplot-for-focus-c-sfo.svg @@ -12,7 +12,7 @@ ]]> - + @@ -49,7 +49,7 @@ - + diff --git a/tests/figs/plotting/mmkin-plot-for-focus-c.svg b/tests/figs/plotting/mmkin-plot-for-focus-c.svg index 1c697328..39c6217f 100644 --- a/tests/figs/plotting/mmkin-plot-for-focus-c.svg +++ b/tests/figs/plotting/mmkin-plot-for-focus-c.svg @@ -38,7 +38,7 @@ 40 60 80 - + @@ -115,7 +115,7 @@ 0 5 10 - + @@ -180,7 +180,7 @@ 40 60 80 - + @@ -255,7 +255,7 @@ 1 2 3 - + @@ -320,7 +320,7 @@ 40 60 80 - + @@ -394,7 +394,7 @@ -0.5 0.5 1.5 - + @@ -459,7 +459,7 @@ 40 60 80 - + @@ -532,7 +532,7 @@ 0 1 2 - + diff --git a/tests/figs/plotting/mmkin-plot-for-sfo-focus-c-and-d.svg b/tests/figs/plotting/mmkin-plot-for-sfo-focus-c-and-d.svg index 72496e86..bb1177bf 100644 --- a/tests/figs/plotting/mmkin-plot-for-sfo-focus-c-and-d.svg +++ b/tests/figs/plotting/mmkin-plot-for-sfo-focus-c-and-d.svg @@ -38,7 +38,7 @@ 40 60 80 - + @@ -115,7 +115,7 @@ 0 5 10 - + @@ -176,7 +176,7 @@ 60 80 100 - + @@ -254,7 +254,7 @@ 0 5 10 - + diff --git a/tests/figs/plotting/plot-err-for-focus-d.svg b/tests/figs/plotting/plot-err-for-focus-d.svg index e7f05168..3e7b5486 100644 --- a/tests/figs/plotting/plot-err-for-focus-d.svg +++ b/tests/figs/plotting/plot-err-for-focus-d.svg @@ -40,7 +40,7 @@ 60 80 100 - + @@ -71,33 +71,33 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + parent m1 @@ -140,7 +140,7 @@ 100 120 140 - + @@ -171,26 +171,26 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/tests/figs/plotting/plot-errmod-with-focus-c-tc.svg b/tests/figs/plotting/plot-errmod-with-focus-c-tc.svg index 8adefc27..05949f24 100644 --- a/tests/figs/plotting/plot-errmod-with-focus-c-tc.svg +++ b/tests/figs/plotting/plot-errmod-with-focus-c-tc.svg @@ -38,7 +38,7 @@ 40 60 80 - + @@ -97,7 +97,7 @@ 40 60 80 - + diff --git a/tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg b/tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg index afd3e064..3a528f9c 100644 --- a/tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg +++ b/tests/figs/plotting/plot-errmod-with-focus-d-obs-eigen.svg @@ -40,7 +40,7 @@ 60 80 100 - + @@ -71,33 +71,33 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + parent m1 @@ -140,7 +140,7 @@ 100 120 140 - + @@ -171,26 +171,26 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg b/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg index 28df5d2d..8c234234 100644 --- a/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg +++ b/tests/figs/plotting/plot-errmod-with-sfo-lin-a-obs.svg @@ -40,7 +40,7 @@ 60 80 100 - + @@ -65,18 +65,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -115,7 +115,7 @@ - + parent @@ -159,7 +159,7 @@ 20 25 30 - + @@ -184,18 +184,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -222,7 +222,7 @@ - + diff --git a/tests/figs/plotting/plot-errmod-with-sfo-lin-a-tc.svg b/tests/figs/plotting/plot-errmod-with-sfo-lin-a-tc.svg index f4e7679d..a670ca80 100644 --- a/tests/figs/plotting/plot-errmod-with-sfo-lin-a-tc.svg +++ b/tests/figs/plotting/plot-errmod-with-sfo-lin-a-tc.svg @@ -40,7 +40,7 @@ 60 80 100 - + @@ -65,18 +65,18 @@ - - - - - - - - - - - - + + + + + + + + + + + + @@ -115,7 +115,7 @@ - + parent @@ -159,7 +159,7 @@ 20 25 30 - + @@ -180,22 +180,22 @@ - + - - - - - - - - - - - - + + + + + + + + + + + + diff --git a/tests/figs/plotting/plot-res-for-focus-c.svg b/tests/figs/plotting/plot-res-for-focus-c.svg index 43b94055..b5e79275 100644 --- a/tests/figs/plotting/plot-res-for-focus-c.svg +++ b/tests/figs/plotting/plot-res-for-focus-c.svg @@ -38,7 +38,7 @@ 40 60 80 - + @@ -101,7 +101,7 @@ 0 5 10 - + diff --git a/tests/figs/plotting/plot-res-for-focus-d.svg b/tests/figs/plotting/plot-res-for-focus-d.svg index ea3388ed..cf4c2ec4 100644 --- a/tests/figs/plotting/plot-res-for-focus-d.svg +++ b/tests/figs/plotting/plot-res-for-focus-d.svg @@ -40,7 +40,7 @@ 60 80 100 - + @@ -71,33 +71,33 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + - + parent m1 @@ -136,7 +136,7 @@ 0 5 10 - + @@ -167,26 +167,26 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/tests/testthat/test_nafta.R b/tests/testthat/test_nafta.R index dad6d84c..62c88983 100644 --- a/tests/testthat/test_nafta.R +++ b/tests/testthat/test_nafta.R @@ -22,6 +22,7 @@ test_that("Test data from Appendix B are correctly evaluated", { plot_nafta <- function() plot(res) if(requireNamespace("vdiffr", quietly = TRUE)) { + skip_if(getRversion() < "4.1.0") vdiffr::expect_doppelganger("NAFTA SOP Appendix B", plot_nafta) } }) @@ -49,6 +50,7 @@ test_that("Test data from Appendix D are correctly evaluated", { plot_nafta <- function() plot(res) if(requireNamespace("vdiffr", quietly = TRUE)) { + skip_if(getRversion() < "4.1.0") vdiffr::expect_doppelganger("Plot NAFTA analysis", plot_nafta) } }) diff --git a/tests/testthat/test_plot.R b/tests/testthat/test_plot.R index c6a187be..40d5928f 100644 --- a/tests/testthat/test_plot.R +++ b/tests/testthat/test_plot.R @@ -21,6 +21,7 @@ test_that("Plotting mkinfit and mmkin objects is reproducible", { 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) 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) -- cgit v1.2.1