Skip to content
Snippets Groups Projects
Commit c5795e61 authored by Sebastian Henz's avatar Sebastian Henz
Browse files

Fix failing test on macos, closes #53

parent d0945cfd
No related branches found
No related tags found
1 merge request!33Fixes to tests and package checks
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
* Fixed a bug where the plotting functions printed `NULL` to the console. * Fixed a bug where the plotting functions printed `NULL` to the console.
* Changed maintainer e-mail address to ensure long-term maintainability. * Changed maintainer e-mail address to ensure long-term maintainability.
* Internal improvements related to package testing.
# stressaddition 3.0.1 # stressaddition 3.0.1
......
...@@ -50,45 +50,41 @@ test_that("all input formats produce identical models", { ...@@ -50,45 +50,41 @@ test_that("all input formats produce identical models", {
test_that("lc values have not changed", { test_that("lc values have not changed", {
# Don't test too accurately because somehow testing on different
# operating systems may give slightly different results.
# Remember to use rhub for running tests on all major platforms
# including macos.
expect_equal( expect_equal(
lc(model, "survival_tox_sys", 50), lapply(lc(model, "survival_tox_sys", 50), round, 2),
list(response = 44.95368, concentration = 3.375735), list(response = 44.95, concentration = 3.38)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_sys", 10), lapply(lc(model, "survival_tox_sys", 10), round, 2),
list(response = 80.91662, concentration = 1.098648), list(response = 80.92, concentration = 1.10)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox", 100/3), lapply(lc(model, "survival_tox", 100/3), round, 2),
list(response = 66.66667, concentration = 1.902125), list(response = 66.67, concentration = 1.90)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_LL5", 42), lapply(lc(model, "survival_tox_LL5", 42), round, 2),
list(response = 52.2, concentration = 2.054426), list(response = 52.20, concentration = 2.05)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env_sys", 50), lapply(lc(model, "survival_tox_env_sys", 50), round, 2),
list(response = 14.67725, concentration = 1.299516), list(response = 14.68, concentration = 1.30)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env_sys", 10), lapply(lc(model, "survival_tox_env_sys", 10), round, 4),
list(response = 26.41904, concentration = 0.0008571244), list(response = 26.419, concentration = 0.0009)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env", 67.89), lapply(lc(model, "survival_tox_env", 67.89), round, 2),
list(response = 24.51453, concentration = 0.7890892), list(response = 24.51, concentration = 0.79)
tolerance = 1e-4
) )
expect_equal( expect_equal(
lc(model, "survival_tox_env_LL5", 3.14159), lapply(lc(model, "survival_tox_env_LL5", 3.14), round, 2),
list(response = 28.73466, concentration = 0.7267524), list(response = 28.74, concentration = 0.73)
tolerance = 1e-4
) )
}) })
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment