Skip to content

Commit bf9d733

Browse files
committed
Test that error message is correctly thrown
1 parent 6dfce50 commit bf9d733

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/logdensityproblems.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
@test model.logdensity ===
2323

2424
@test_throws ArgumentError AbstractMCMC.LogDensityModel(mylogdensity)
25+
26+
@test_throws MethodError LogDensityProblems.logdensity(model, ones(10))
27+
if isdefined(Base.Experimental, :register_error_hint)
28+
@test_throws "is a wrapper" LogDensityProblems.logdensity(model, ones(10))
29+
end
2530
end
2631

2732
@testset "fallback for log densities" begin

0 commit comments

Comments
 (0)