Skip to content

Commit

Permalink
fix failing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Red-Portal committed Nov 15, 2023
1 parent 953df70 commit a643334
Showing 1 changed file with 11 additions and 14 deletions.
25 changes: 11 additions & 14 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,26 @@ include("models/normalnormalgibbs.jl")
n_dim_param = 2
n_dim_data = 1

@testset for test in [TwoSampleTest(n_samples, n_samples),
TwoSampleGibbsTest(n_samples, n_samples)]
@testset for test in [
TwoSampleTest(n_samples, n_samples),
TwoSampleGibbsTest(n_samples, n_samples),
ExactRankTest(n_samples, n_samples)
]
n_dim_default = if test isa TwoSampleTest || test isa TwoSampleGibbsTest
(n_dim_param + n_dim_data)*2
else
n_dim_param*2
end

@testset "mcmctest" begin
@testset "return type" begin
pvalue = mcmctest(test, subject; show_progress=false)
@test eltype(pvalue) <: Real

n_dim_default = if test isa TwoSampleTest
(n_dim_param + n_dim_data)*2
else
n_dim_param*2
end
@test length(pvalue) == n_dim_default
end

@testset "custom statistics" begin
pvalue = mcmctest(test, subject; show_progress=false, statistics = θ -> θ)

n_dim_default = if test isa TwoSampleTest
(n_dim_param + n_dim_data)*2
else
n_dim_param*2
end
@test length(pvalue) == div(n_dim_default,2)
end

Expand Down

0 comments on commit a643334

Please sign in to comment.