diff options
Diffstat (limited to 'tests/testthat/test_mkinfit_errors.R')
-rw-r--r-- | tests/testthat/test_mkinfit_errors.R | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/testthat/test_mkinfit_errors.R b/tests/testthat/test_mkinfit_errors.R index c1e9da1d..85ee574e 100644 --- a/tests/testthat/test_mkinfit_errors.R +++ b/tests/testthat/test_mkinfit_errors.R @@ -4,28 +4,24 @@ test_that("mkinfit stops to prevent and/or explain user errors", { expect_error(mkinfit("foo", FOCUS_2006_A)) expect_error(mkinfit(3, FOCUS_2006_A)) - # We remove zero observations from FOCUS_2006_D beforehand in - # order to avoid another expect_warning in the code - FOCUS_2006_D <- subset(FOCUS_2006_D, value != 0) - # We get a warning if we use transform_fractions = FALSE with formation fractions # and an error if any pathway to sink is turned off as well expect_warning( expect_error( - mkinfit(SFO_SFO.ff.nosink, FOCUS_2006_D, transform_fractions = FALSE, quiet = TRUE), + mkinfit(SFO_SFO.ff.nosink, FOCUS_D, transform_fractions = FALSE, quiet = TRUE), "turn off pathways to sink" ), "sum of formation fractions may exceed one") - expect_error(mkinfit(SFO_SFO.ff, FOCUS_2006_D, transform_fractions = TRUE, + expect_error(mkinfit(SFO_SFO.ff, FOCUS_D, transform_fractions = TRUE, parms.ini = c(f_parent_to_m1 = 0.5), fixed_parms = "f_parent_to_m1", quiet = TRUE), "not supported") - expect_error(mkinfit(SFO_SFO.ff, FOCUS_2006_D, + expect_error(mkinfit(SFO_SFO.ff, FOCUS_D, parms.ini = c(f_parent_to_m1 = 1.1), quiet = TRUE), "sum up to more than 1") - expect_error(mkinfit(SFO_SFO, FOCUS_2006_D, solution_type = "analytical"), "not implemented") + expect_error(mkinfit(FOMC_SFO, FOCUS_D, solution_type = "analytical"), "not implemented") expect_error(mkinfit("FOMC", FOCUS_2006_A, solution_type = "eigen"), "coefficient matrix not present") }) |