Skip to content

Commit

Permalink
Merge pull request #47 from TuringLang/csp/test-updates
Browse files Browse the repository at this point in the history
Added more specific indexing tests.
  • Loading branch information
cpfiffer authored Mar 5, 2019
2 parents ef1fa9d + 2f241d7 commit 48270d3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/diagnostic_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ chn = Chains(val, start = 1, thin = 2)
@test size(chn) == (999, 4, 2)
@test keys(chn) == ["Param1", "Param2", "Param3", "Param4"]
@test isa(chn[:,1,:], MCMCChains.AbstractChains)
@test isa(chn[200:300,"Param1",:], MCMCChains.AbstractChains)
@test isa(chn[200:300,["Param1", "Param3"],:], MCMCChains.AbstractChains)
@test isa(chn[200:300,"Param1",1], MCMCChains.AbstractChains)
@test length(vec(chn[:,1,:].value)) == n_chain * n_iter
@test all(collect(skipmissing(chn[:,1,1].value)) .== val[:,1,1])
@test all(chn[:,1,2].value .== val[:,1,2])
Expand Down

0 comments on commit 48270d3

Please sign in to comment.