diff --git a/test/abstractmcmc.jl b/test/abstractmcmc.jl index b620a85f..7d325f03 100644 --- a/test/abstractmcmc.jl +++ b/test/abstractmcmc.jl @@ -28,10 +28,14 @@ using Statistics: mean @test θ == t.z.θ new_state = AbstractMCMC.setparams!!(model, s, θ) @test new_state.transition.z.θ == θ - @test new_state.transition.z.ℓπ == s.transition.z.ℓπ - @test new_state.transition.z.ℓκ == s.transition.z.ℓκ + new_state_logπ = new_state.transition.z.ℓπ + @test new_state_logπ.value == s.transition.z.ℓπ.value + @test new_state_logπ.gradient == s.transition.z.ℓπ.gradient + new_state_logκ = new_state.transition.z.ℓκ + @test new_state_logκ.value == s.transition.z.ℓκ.value + @test new_state_logκ.gradient == s.transition.z.ℓκ.gradient @test new_state.transition.z.r == s.transition.z.r - + new_θ = randn(rng, 2) new_state = AbstractMCMC.setparams!!(model, s, new_θ) @test AbstractMCMC.getparams(new_state) == new_θ