summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRanke Johannes <johannes.ranke@agroscope.admin.ch>2026-02-13 13:19:41 +0100
committerRanke Johannes <johannes.ranke@agroscope.admin.ch>2026-02-13 13:19:41 +0100
commit3511d02b8eaf4ff4ba24b1824005e8372af74f18 (patch)
tree7c507df167fd53b5e04dcedf278d50910ad1176b /tests
parent6a843ae1d50cc4f4a0a374ff6a2106a996e94e36 (diff)
Check for matching argument lengths in PEC_sw_drift
Diffstat (limited to 'tests')
-rw-r--r--tests/testthat/test_PEC_sw_drift.R4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/testthat/test_PEC_sw_drift.R b/tests/testthat/test_PEC_sw_drift.R
index 5d343d0..da5b185 100644
--- a/tests/testthat/test_PEC_sw_drift.R
+++ b/tests/testthat/test_PEC_sw_drift.R
@@ -62,5 +62,7 @@ test_that("The function is vectorised also with respect to crop groups", {
expect_equal(
round(res_vec_2, 3),
set_units(c('5 m' = 0.191, '5 m' = 0.160, '5 m' = 0.191, '5 m' = 0.095, '10 m' = 3.936, '5 m' = 6.628), "\u00B5g/L"))
-
+
+ # If different argument lengths are supplied, we should get an error
+ expect_error(PEC_sw_drift(c(200, 100), distances = c(1, 5, 10)), "argument lengths")
})

Contact - Imprint