Skip to content

Commit 9c4f1bc

Browse files
richardreeveKristofferC
authored andcommitted
Fix test_metricity failure to test (#88)
* Fix Base.Test to Compat.Test for 0.7. * Return test_metricity to a macro. Add in better @testset structure for debugging. Fix ./ misread. * Fix float conversion for F64 type. * Add in Bray-Curtis metricity test. * Fix indentation for testset * Pairwise tests were not being carried out either. Now generating errors. * Colwise tests now tidied up into testsets and incorrect test failures reduced by switching from ≈ to all( .≈ ). * Fix test failures due to rounding errors in accumulations. * Change back to function from macro for consistency.
1 parent a053008 commit 9c4f1bc

File tree

4 files changed

+187
-186
lines changed

4 files changed

+187
-186
lines changed

test/F64.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Base.:^(a::F64, b::F64) = F64(a.x^b.x)
2121
Base.:^(a::Number, b::F64) = a^b.x
2222
Base.log(a::F64) = F64(log(a.x))
2323
Base.isfinite(a::F64) = isfinite(a.x)
24-
Base.float(a::F64) = a
24+
Base.float(a::F64) = a.x
2525
Base.rtoldefault(a::Type{F64}, b::Type{F64}) = Base.rtoldefault(Float64, Float64)
2626
# comparison
2727
Base.isapprox(a::F64, b::F64) = isapprox(a.x, b.x)
@@ -40,4 +40,4 @@ Base.convert(::Type{F64}, a::T) where {T <: Number} = F64(a)
4040

4141
# conversion
4242
Base.Int64(a::F64) = Int64(a.x)
43-
Base.Int32(a::F64) = Int32(a.x)
43+
Base.Int32(a::F64) = Int32(a.x)

test/REQUIRE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Compat 0.33.0

test/runtests.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
using Distances
2-
using Base.Test
2+
using Compat.Test
33

44
include("F64.jl")
55
include("test_dists.jl")

0 commit comments

Comments
 (0)