Skip to content

Commit bab8827

Browse files
committed
Add one more test using custom model names
1 parent 1a5680a commit bab8827

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

tests/testthat/test_compare.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@ test_that("loo_compare throws appropriate errors", {
2828
"All models must have the same number of observations, but models have inconsistent observation counts: 'model1' (32), 'model2' (32), 'model3' (31)",
2929
fixed = TRUE
3030
)
31+
expect_error(
32+
loo_compare(x = list("Model A" = w1, "Model B" = w2, "Model C" = w3)),
33+
"All models must have the same number of observations, but models have inconsistent observation counts: 'Model A' (32), 'Model B' (32), 'Model C' (31)",
34+
fixed = TRUE
35+
)
3136
})
3237

3338
test_that("loo_compare throws appropriate warnings", {

0 commit comments

Comments
 (0)