Skip to content

Commit

Permalink
test correct error
Browse files Browse the repository at this point in the history
Supplying one prior caused the error to be due to the sum of priors
being greater than 1 (since priors of length 1 are recycled). This tests
if errors are emitted if a mismatch of number of classes and priors exist
  • Loading branch information
KaiAragaki committed Jul 20, 2024
1 parent af99754 commit 7264b5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/testthat/test-validate-priors.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ test_that("num priors processed correctly", {
expect_error(process_priors_num(c(0.5, 0.6), factor(c("a", "b"))))
expect_error(process_priors_num(1, factor(c("a", "b"))))
expect_no_error(process_priors_num(1.000001, factor("a")))
expect_error(process_priors_num(1, factor(c("a", "b"))))
expect_error(process_priors_num(c(0.5, 0.5), factor("a")))
})

0 comments on commit 7264b5b

Please sign in to comment.