Skip to content

Commit dbcb124

Browse files
committed
test cases
1 parent 82bb33b commit dbcb124

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

test/modeling_library/distributions.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,12 @@ end
2424
# out of support
2525
@test logpdf(beta, -1, 0.5, 0.5) == -Inf
2626

27+
# avoid infinities, sanely
28+
@test logpdf(beta, eps(typeof(0.)), 0.5, 0.5) < logpdf(beta, 0., 0.5, 0.5) < Inf
29+
@test logpdf(beta, eps(typeof(0.)), 0.5, 1.5) < logpdf(beta, 0., 0.5, 1.5) < Inf
30+
@test logpdf(beta, 1-eps(typeof(0.)), 0.5, 0.5) < logpdf(beta, 1., 0.5, 0.5) < Inf
31+
@test logpdf(beta, 1-eps(typeof(0.)), 1.5, 0.5) < logpdf(beta, 1., 1.5, 0.5) < Inf
32+
2733
# logpdf_grad
2834
f = (x, alpha, beta_param) -> logpdf(beta, x, alpha, beta_param)
2935
args = (0.4, 0.2, 0.3)

0 commit comments

Comments
 (0)