aboutsummaryrefslogtreecommitdiff
path: root/tests/testthat/test_water-sediment.R
diff options
context:
space:
mode:
authorJohannes Ranke <johannes.ranke@jrwb.de>2025-02-14 07:19:15 +0100
committerJohannes Ranke <johannes.ranke@jrwb.de>2025-02-14 07:19:15 +0100
commitb0f08271d1dae8ffaf57f557c27eba1314ece1d5 (patch)
tree98da899d455d6945849d6f4b4e98adfb98dc8b2b /tests/testthat/test_water-sediment.R
parent7dc59c522d0639f6473463340e518e2e8074e364 (diff)
parent55d9c2331e468efd364472555dbfae84603a4f73 (diff)
Merge branch 'main' into dev
Diffstat (limited to 'tests/testthat/test_water-sediment.R')
-rw-r--r--tests/testthat/test_water-sediment.R17
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")
+})

Contact - Imprint