Skip to content

Commit

Permalink
Add tests for coev_calculate_theta()
Browse files Browse the repository at this point in the history
  • Loading branch information
Scott Claessens authored and Scott Claessens committed Jul 22, 2024
1 parent 32e7030 commit 7b58316
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/testthat/test-coev_calculate_theta.R
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,20 @@ test_that("coev_calculate_theta() produces expected errors and output", {
),
"Argument 'intervention_values' contains duplicated variable names."
)
expect_error(
coev_calculate_theta(
object = m,
intervention_values = list(y = c(NA, NA), z = 0)
),
"Values in 'intervention_values' must each be of length one."
)
expect_error(
coev_calculate_theta(
object = m,
intervention_values = list(y = "fail", z = 0)
),
"Values in 'intervention_values' must each be NA or numeric."
)
expect_error(
coev_calculate_theta(
object = m,
Expand Down

0 comments on commit 7b58316

Please sign in to comment.