Skip to content

Commit 50b9aa7

Browse files
committed
Add tests for NoDist
1 parent 83f8f98 commit 50b9aa7

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/distribution_wrappers.jl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
using DynamicPPL
2+
using Distributions
3+
4+
@testset "distribution_wrappers.jl" begin
5+
d = Normal()
6+
nd = DynamicPPL.NoDist(d)
7+
8+
# Smoke test
9+
rand(nd)
10+
11+
# Actual tests
12+
@test minimum(nd) == -Inf
13+
@test maximum(nd) == Inf
14+
@test logpdf(ndf, 15.0) == 0
15+
@test logpdf_with_trans(nd, 0)
16+
end

0 commit comments

Comments
 (0)