Skip to content

Commit a76d55d

Browse files
committed
Add test for check_model with manual prefix
1 parent e1472ea commit a76d55d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/debug_utils.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,15 @@
6060
end
6161
model = ModelOuterWorking()
6262
@test check_model(model; error_on_failure=true)
63+
64+
# With manual prefixing, https://github.com/TuringLang/DynamicPPL.jl/issues/785
65+
@model function ModelOuterWorking2()
66+
x1 ~ to_submodel(prefix(ModelInner(), :a), false)
67+
x2 ~ to_submodel(prefix(ModelInner(), :b), false)
68+
return (x1, x2)
69+
end
70+
model = ModelOuterWorking2()
71+
@test check_model(model; error_on_failure=true)
6372
end
6473

6574
@testset "subsumes (x then x[1])" begin

0 commit comments

Comments
 (0)