From 915f8c626add81a18f8b21696acabe9ed74d662b Mon Sep 17 00:00:00 2001 From: Delaigue Olivier <olivier.delaigue@irstea.fr> Date: Thu, 28 Jan 2021 20:55:45 +0100 Subject: [PATCH] test(vignette): add comparison between CaRamel vignette and Rda file objects Refs #61 --- tests/testthat/test-vignettes.R | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/testthat/test-vignettes.R b/tests/testthat/test-vignettes.R index 497cb7d8..88de5d11 100644 --- a/tests/testthat/test-vignettes.R +++ b/tests/testthat/test-vignettes.R @@ -11,11 +11,14 @@ test_that("V02.1_param_optim works", { skip_on_cran() rm(list = ls()) load(system.file("vignettesData/vignetteParamOptim.rda", package = "airGR")) + load(system.file("vignettesData/vignetteParamOptimCaramel.rda", package = "airGR")) rda_resGLOB <- resGLOB rda_resPORT <- resPORT + rda_optMO <- optMO expect_true(RunVignetteChunks("V02.1_param_optim")) expect_equal(summary(resGLOB), summary(rda_resGLOB), tolerance = 1e-7) expect_equal(resGLOB[, -1], rda_resGLOB[, -1], tolerance = 1e-2) # High tolerance due to randomisation in optimisations + expect_equal(summary(optMO$parameters), summary(rda_optMO$parameters), tolerance = 1e-7) }) test_that("V02.2_param_mcmc works", { -- GitLab