diff options
Diffstat (limited to 'tests/testthat/test_water-sediment.R')
-rw-r--r-- | tests/testthat/test_water-sediment.R | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/testthat/test_water-sediment.R b/tests/testthat/test_water-sediment.R new file mode 100644 index 00000000..6d5693c9 --- /dev/null +++ b/tests/testthat/test_water-sediment.R @@ -0,0 +1,17 @@ +# Issue #13 on github +water_sed_no_sed_sink <- mkinmod( + use_of_ff = "min", + water = mkinsub("SFO", "sediment"), + sediment = mkinsub("SFO", "water", sink = FALSE)) + +ws_data <- FOCUS_D +levels(ws_data$name) <- c("water", "sediment") + +test_that("An reversible reaction with the sink turned off in the second compartment works", { + # Solution method "analytical" was previously available, but erroneous + expect_error( + ws_fit_no_sed_sink <- mkinfit(water_sed_no_sed_sink, ws_data, quiet = TRUE, solution_type = "analytical"), + "Analytical solution not implemented") + ws_fit_no_sed_sink_default <- mkinfit(water_sed_no_sed_sink, ws_data, quiet = TRUE) + expect_equal(ws_fit_no_sed_sink_default$solution_type, "deSolve") +}) |