Skip to content

Commit eb564e5

Browse files
committed
added a simple test for docstring
1 parent 29389b2 commit eb564e5

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/compiler.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -615,4 +615,16 @@ end
615615

616616
@test lp_w_threads lp_wo_threads
617617
end
618+
619+
@testset "docstring" begin
620+
"This is a test"
621+
@model function demo(x)
622+
m ~ Normal()
623+
x ~ Normal(m, 1)
624+
end
625+
626+
m = demo(0.)
627+
s = @doc(m)
628+
@test s == "This is a test"
629+
end
618630
end

0 commit comments

Comments
 (0)