diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-27 08:06:59 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-27 08:06:59 +0100 |
commit | c446b59e675aeff08ff7205b05f06cd81bf6dc68 (patch) | |
tree | e02e6be6232df57e8722865b06e71af3157af891 /tests/testthat/test_plots_summary_twa.R | |
parent | 10f2314d12bc1e1664b1ff1db015d1df9f7fbe34 (diff) |
Fix CAKE export test to actually work
Also test the model specification via the link argument
Diffstat (limited to 'tests/testthat/test_plots_summary_twa.R')
-rw-r--r-- | tests/testthat/test_plots_summary_twa.R | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/testthat/test_plots_summary_twa.R b/tests/testthat/test_plots_summary_twa.R index 5201567d..e13111bb 100644 --- a/tests/testthat/test_plots_summary_twa.R +++ b/tests/testthat/test_plots_summary_twa.R @@ -51,7 +51,6 @@ test_that("Time weighted average concentrations are correct", { context("Summary") test_that("The summary is reproducible", { - skip_on_cran() fit <- fits[["DFOP", "FOCUS_C"]] test_summary <- summary(fit) test_summary$fit_version <- "Dummy 0.0 for testing" @@ -78,3 +77,11 @@ test_that("Plotting mmkin objects is reproducible", { vdiffr::expect_doppelganger("mmkin plot for SFO (FOCUS C and D)", mmkin_SFO) }) +context("AIC calculation") + +test_that("The AIC is reproducible", { + expect_equivalent(AIC(fits[["SFO", "FOCUS_C"]]), 59.8, scale = 1, tolerance = 0.1) + expect_equivalent(AIC(fits[, "FOCUS_C"]), + data.frame(df = c(3, 4, 5, 5), AIC = c(59.8, 44.7, 29.1, 39.3)), + scale = 1, tolerance = 0.1) +}) |