From 7264b5ba0a14a8b7f66265063abf4a74eb53569f Mon Sep 17 00:00:00 2001 From: Kai Aragaki Date: Sat, 20 Jul 2024 01:00:57 -0400 Subject: [PATCH] test correct error 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 --- tests/testthat/test-validate-priors.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/testthat/test-validate-priors.R b/tests/testthat/test-validate-priors.R index 8b5777a..00ea9fe 100644 --- a/tests/testthat/test-validate-priors.R +++ b/tests/testthat/test-validate-priors.R @@ -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"))) })