From 2f241d7602a6925a04229b64c0aa09fac6bbb1ae Mon Sep 17 00:00:00 2001 From: Cameron Pfiffer <cpfiffer@gmail.com> Date: Tue, 5 Mar 2019 05:33:37 -0800 Subject: [PATCH] Added more specific indexing tests. --- test/diagnostic_tests.jl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/diagnostic_tests.jl b/test/diagnostic_tests.jl index 040f07cf..9e6e9236 100644 --- a/test/diagnostic_tests.jl +++ b/test/diagnostic_tests.jl @@ -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])