-
Notifications
You must be signed in to change notification settings - Fork 32
Closed
Description
The "fixed" testset depends on testapprox
which is defined in "test/normed.jl" (formerly named ufixed.jl).
FixedPointNumbers.jl/test/fixed.jl
Lines 86 to 90 in 70ae1d6
@testset "testapprox" begin | |
for T in [Fixed{Int8,7}, Fixed{Int16,8}, Fixed{Int16,10}] | |
testapprox(T) # defined in ufixed.jl | |
end | |
end |
FixedPointNumbers.jl/test/normed.jl
Lines 233 to 240 in 70ae1d6
function testapprox(::Type{T}) where {T} | |
for x = typemin(T):eps(T):typemax(T)-eps(T) | |
y = x+eps(T) | |
@test x ≈ y | |
@test y ≈ x | |
@test !(x ≈ y+eps(T)) | |
end | |
end |
This thwarts the selective execution of tests and causes an error(UndefVarError: testapprox not defined
) in certain environments (e.g. Julia v1.0.3 32-bit ARMv7).
I think testapprox
is not so complicated. It may be a good idea to inline the function or define it locally.
This may be off topic, but I also think there are too many test cases generated by testapprox
(or its friend testtrunc
). @test
should be outside the loop.
Metadata
Metadata
Assignees
Labels
No labels