From 30dca23817f4de70b4f7aa27645be1ee482b8072 Mon Sep 17 00:00:00 2001 From: Xianda Sun Date: Thu, 31 Oct 2024 09:44:29 +0000 Subject: [PATCH] fix more test error --- test/abstractmcmc.jl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) 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_θ