diff --git a/Project.toml b/Project.toml index cdecf98fb..7c63d7a84 100644 --- a/Project.toml +++ b/Project.toml @@ -17,6 +17,7 @@ Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0" [compat] +Aqua = "0.6.5" DataAPI = "1" DataStructures = "0.10, 0.11, 0.12, 0.13, 0.14, 0.17, 0.18" LogExpFunctions = "0.3" @@ -26,6 +27,7 @@ StatsAPI = "1.2" julia = "1" [extras] +Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf" Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" @@ -34,4 +36,4 @@ StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" [targets] -test = ["BenchmarkTools", "Dates", "DelimitedFiles", "OffsetArrays", "StableRNGs", "Test"] +test = ["Aqua", "BenchmarkTools", "Dates", "DelimitedFiles", "OffsetArrays", "StableRNGs", "Test"] diff --git a/docs/Project.toml b/docs/Project.toml index 525749756..7fe605752 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,7 +1,7 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" -StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" StatsAPI = "82ae8749-77ed-4fe6-ae5f-f523153014b0" +StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91" [compat] Documenter = "0.27" diff --git a/src/statmodels.jl b/src/statmodels.jl index 291b6e2e7..89ce7b99a 100644 --- a/src/statmodels.jl +++ b/src/statmodels.jl @@ -55,7 +55,7 @@ end Show a p-value using 6 characters, either using the standard 0.XXXX representation or as , ≥, isless, isequal), - lhs in vals, rhs in vals - # make sure that T behaves like a Real, - # regardless of whether it's on the LHS, RHS or both - @test f(T(lhs), T(rhs)) == f(lhs, rhs) - @test f(lhs, T(rhs)) == f(lhs, rhs) - @test f(T(lhs), rhs) == f(lhs, rhs) - end - - # the (approximate) equality operators get a bit more attention - for T in [PValue, TestStat] - @test T(Rational(1,3)) ≈ T(1/3) - @test Rational(1,3) ≈ T(1/3) atol=0.01 - @test T(Rational(1,3)) isa Real - @test T(T(0.05)) === T(0.05) - @test hash(T(0.05)) == hash(0.05) - @test hash(T(0.05), UInt(42)) == hash(0.05, UInt(42)) - end -end - @test sprint(showerror, ConvergenceException(10)) == "failure to converge after 10 iterations." @test sprint(showerror, ConvergenceException(10, 0.2, 0.1)) ==