Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: David Widmann <[email protected]>
  • Loading branch information
torfjelde and devmotion authored Aug 7, 2023
1 parent 9b2223a commit 3528200
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/linking.jl
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ end
vis = DynamicPPL.TestUtils.setup_varinfos(model, rand(model), (@varname(x),))
@testset "$(short_varinfo_name(vi))" for vi in vis
@test length(vi[:]) == 2
@test getlogp(vi) 0
@test iszero(getlogp(vi))
# Linked.
vi_linked = DynamicPPL.link!!(deepcopy(vi), model)
@test length(vi_linked[:]) == 1
@test !(getlogp(vi_linked) 0) # should now include the log-absdet-jacobian correction
@test !iszero(getlogp(vi_linked)) # should now include the log-absdet-jacobian correction
# Invlinked.
vi_invlinked = DynamicPPL.invlink!!(deepcopy(vi_linked), model)
@test length(vi_invlinked[:]) == 2
@test getlogp(vi_invlinked) 0
@test iszero(getlogp(vi_invlinked))
end
end
end

0 comments on commit 3528200

Please sign in to comment.