diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-26 09:12:50 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2019-02-26 09:12:50 +0100 |
commit | 6693ee373c61d716e877386d6be16e3f9f0f40ab (patch) | |
tree | 7e1e8607c96b459878ca81e9b183795399aeb516 /tests/testthat/test_CAKE_export.R | |
parent | 885ea2cd3392e57efff72e5094643917d6ba2be8 (diff) |
Add another NAFTA dataset + test
Diffstat (limited to 'tests/testthat/test_CAKE_export.R')
-rw-r--r-- | tests/testthat/test_CAKE_export.R | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/tests/testthat/test_CAKE_export.R b/tests/testthat/test_CAKE_export.R index aeb192c8..5f984782 100644 --- a/tests/testthat/test_CAKE_export.R +++ b/tests/testthat/test_CAKE_export.R @@ -27,25 +27,3 @@ test_that("Exporting is reproducible", { csf <- readLines(con = "FOCUS_2006_D.csf") expect_known_output(csf, "FOCUS_2006_D.txt") }) - -test_that("Test data from Appendix D are correctly evaluated", { - expect_message(res <- nafta(MRID_555555, "MRID 555555")) - - # From Figure D.1 - dtx_sop <- matrix(c(407, 541, 429, 1352, 5192066, 2383), nrow = 3, ncol = 2) - expect_equivalent(res$distimes[, 1:2], dtx_sop, tolerance = 1, - scale = 1) - - C0_sop <- c(SFO = 83.8, IORE = 96.9, DFOP = 97.6) - C0_mkin <- sapply(res$parameters, function(x) x["parent_0", "Estimate"]) - expect_equivalent(C0_mkin, C0_sop, scale = 1, tolerance = 0.1) - - expect_equal(round(res$S_c), 717) - expect_equal(signif(res$S[["SFO"]], 3), 1.38e+3) - expect_equal(round(res$t_rep), 841) - - expect_known_output(print(res), "print_nafta_analysis.txt") - - plot_nafta <- function() plot(res) - vdiffr::expect_doppelganger("Plot NAFTA analysis", plot_nafta) -}) |