Skip to content

Commit

Permalink
don't use exact comparison for floating point vals
Browse files Browse the repository at this point in the history
  • Loading branch information
palday committed Oct 1, 2019
1 parent a954481 commit e5aae50
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/pirls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ end
gmldγ = fit(MixedModel, @formula(RT_raw ~ 1 + Class * NativeLanguage + (1|Subject) + (1|Word)),
lexdec, Gamma(), IdentityLink(), fast=false)
@test all(gmldγ.optsum.initial_step .> 0)
@test first(gmldγ.θ) == 0
@test first(gmldγ.θ) 0 atol=0.001

# don't know how much sense this model makes, but it's a boundary fit on two
# boundaries and it uses InverseGaussian()
gmldig = fit(MixedModel, @formula(RT_raw ~ 1 + Class * NativeLanguage + (1|Subject) + (1|Word)),
lexdec, InverseGaussian(), IdentityLink(), fast=false)
@test all(gmldγ.optsum.initial_step .> 0)
@test all(gmldig.θ .== 0)
@test all(isapprox.(gmldig.θ, 0, atol=0.001))
end

0 comments on commit e5aae50

Please sign in to comment.