Skip to content

Commit

Permalink
Test that error message is correctly thrown
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Sep 11, 2024
1 parent 6dfce50 commit 13ebdab
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/logdensityproblems.jl
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
@test model.logdensity ===

@test_throws ArgumentError AbstractMCMC.LogDensityModel(mylogdensity)

@test_throws MethodError LogDensityProblems.logdensity(model, ones(10))
@test_throws "is a wrapper" LogDensityProblems.logdensity(model, ones(10))
end

@testset "fallback for log densities" begin
Expand Down

0 comments on commit 13ebdab

Please sign in to comment.