diff options
| author | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-18 08:29:38 +0200 |
|---|---|---|
| committer | Johannes Ranke <jranke@uni-bremen.de> | 2015-06-18 08:29:38 +0200 |
| commit | 7faffad1907995f1b623ede8fc2e386693428e22 (patch) | |
| tree | 6c68057b690daabf566a1d4825e177af1d8b9355 /pkg/tests/testthat/test_PEC_sed.R | |
| parent | 53099978c971ee8e5c94e67bf972f51629d67fd3 (diff) | |
| parent | fef0bb7fe916f91dcff089c17aa3290c0ea1ab1f (diff) | |
Merge branch 'master' into pfm_chent
Conflicts:
pkg/DESCRIPTION
pkg/NAMESPACE
Diffstat (limited to 'pkg/tests/testthat/test_PEC_sed.R')
| -rw-r--r-- | pkg/tests/testthat/test_PEC_sed.R | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pkg/tests/testthat/test_PEC_sed.R b/pkg/tests/testthat/test_PEC_sed.R new file mode 100644 index 0000000..d83be0f --- /dev/null +++ b/pkg/tests/testthat/test_PEC_sed.R @@ -0,0 +1,9 @@ +context("Simple PEC sediment calculations") + +test_that("PEC_sw_sed calculates correctly using the percentage method", { + # Application of 100 g/ha, 1 m spray drift distance (2.77% drift input), 50% in sediment, + # default assumptions of CRD spreadsheet (5 cm sediment depth, 1.3 kg/L sediment density) + # Reference value calculated with CRD spreadsheet + PEC_sw_100_1_m <- PEC_sw_drift_ini(100, distances = 1) + expect_equivalent(round(PEC_sw_sed(PEC_sw_100_1_m, percentage = 50), 3), 2.131) +}) |
