Skip to content

Commit 52b4301

Browse files
committed
added testing for model_codetyped and model_warntype
1 parent 076aee5 commit 52b4301

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/debug_utils.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,14 @@
186186
@test check_model(model; error_on_failure=true)
187187
end
188188
end
189+
190+
@testset "model_warntype & model_codetyped" begin
191+
model = DynamicPPL.TestUtils.DEMO_MODELS[1]
192+
codeinfo, retype = DynamicPPL.DebugUtils.model_codetyped(model)
193+
@test codeinfo isa Core.CodeInfo
194+
@test retype <: Tuple
195+
196+
# Just make sure the following is runnable.
197+
@test (DynamicPPL.DebugUtils.model_warntype(model); true)
198+
end
189199
end

0 commit comments

Comments
 (0)