Skip to content

Commit 50e6ede

Browse files
authored
Fix syntax
1 parent 0cab4f5 commit 50e6ede

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

test/compiler.jl

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -214,17 +214,15 @@ priors = 0 # See "new grammar" test.
214214
@test varinfo === _varinfo
215215
end
216216
@testset "nested model" begin
217-
function nest(α_0, θ_0)
218-
@model gdemo(x) = begin
219-
λ ~ Gamma(α_0, θ_0)
220-
m ~ Normal(0, (1 / λ))
221-
x .~ Normal(m, (1 / λ))
217+
function makemodel(p)
218+
@model testmodel(x) = begin
219+
x[1] ~ Bernoulli(p)
222220
global lp = @logpdf()
221+
return x
223222
end
224-
225-
return gdemo
223+
return testmodel
226224
end
227-
model = nest(2.0, inv(3.0))([1.5, 2.0])
225+
model = makemodel(0.5)([1.0])
228226
varinfo = DynamicPPL.VarInfo(model)
229227
model(varinfo)
230228
@test getlogp(varinfo) == lp

0 commit comments

Comments
 (0)