diff options
author | Ranke Johannes <johannes.ranke@agroscope.admin.ch> | 2024-07-22 18:10:00 +0200 |
---|---|---|
committer | Ranke Johannes <johannes.ranke@agroscope.admin.ch> | 2024-07-22 18:10:00 +0200 |
commit | e91b2cdf11ab1c7acbd20f358c7a3d634ec90940 (patch) | |
tree | de41f7b4cba0dad1f7007527f1d8dc21cf4282e0 /tests/testthat/test_water-sediment.R | |
parent | 67f8e814ec8e89b9411d387acdc06f78b9dcbbd2 (diff) | |
parent | e18c8da322ddb11105b7fdf93e9dd538673fb946 (diff) |
Merge remote-tracking branch 'refs/remotes/origin/main'
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") +}) |