Skip to content

Commit a6579bc

Browse files
committed
Add test for changes
1 parent c0261f4 commit a6579bc

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

test/independence.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
@testset "Turing independence" begin
2+
@model coinflip(y) = begin
3+
p ~ Beta(1, 1)
4+
N = length(y)
5+
for i = 1:N
6+
y[i] ~ Bernoulli(p)
7+
end
8+
end
9+
model = coinflip([1,1,0])
10+
11+
vi = VarInfo()
12+
13+
runmodel!(model, vi, SampleFromPrior(), LikelihoodContext())
14+
end

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ using .Turing
77
include("compiler.jl")
88
include("varinfo.jl")
99
include("prob_macro.jl")
10+
include("independence.jl")
1011
end

0 commit comments

Comments
 (0)