Skip to content

Commit

Permalink
rm some testsets
Browse files Browse the repository at this point in the history
  • Loading branch information
mcabbott committed May 16, 2022
1 parent 6c58dd4 commit bea4d64
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions test/DualTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,6 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false

# Predicates #
#------------#
@testset "Predicates" begin

@test ForwardDiff.isconstant(zero(FDNUM))
@test ForwardDiff.isconstant(one(FDNUM))
Expand Down Expand Up @@ -337,7 +336,6 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false
@test isodd(Dual{TestTag()}(Dual{TestTag()}(1)))
@test !(isodd(Dual{TestTag()}(Dual{TestTag()}(2))))

end
########################
# Promotion/Conversion #
########################
Expand Down Expand Up @@ -411,7 +409,6 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false

# Division #
#----------#
@testset "Division" begin

if M > 0 && N > 0
# Recall that FDNUM = Dual{TestTag()}(PRIMAL, PARTIALS) has N partials,
Expand All @@ -432,11 +429,8 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false
@test dual_isapprox(NESTED_FDNUM / PRIMAL, Dual{TestTag()}(value(NESTED_FDNUM) / PRIMAL, partials(NESTED_FDNUM) / PRIMAL))
@test dual_isapprox(PRIMAL / NESTED_FDNUM, Dual{TestTag()}(PRIMAL / value(NESTED_FDNUM), (-(PRIMAL) / value(NESTED_FDNUM)^2) * partials(NESTED_FDNUM)))

end

# Exponentiation #
#----------------#
@testset "Exponentiation" begin

# If V == Int, the LHS terms are Int's. Large inputs cause integer overflow
# within the generic fallback of `isapprox`, resulting in a DomainError.
Expand All @@ -451,7 +445,6 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false

@test partials(NaNMath.pow(Dual{TestTag()}(-2.0, 1.0), Dual{TestTag()}(2.0, 0.0)), 1) == -4.0

end
###################################
# General Mathematical Operations #
###################################
Expand Down Expand Up @@ -544,7 +537,6 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false

# Special Cases #
#---------------#
@testset "Special Cases" begin

@test_broken dual_isapprox(hypot(FDNUM, FDNUM2, FDNUM), sqrt(2*(FDNUM^2) + FDNUM2^2))
@test_broken dual_isapprox(hypot(FDNUM, FDNUM2, FDNUM3), sqrt(FDNUM^2 + FDNUM2^2 + FDNUM3^2))
Expand All @@ -569,8 +561,7 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false
@test dual_isapprox(f(FDNUM, PRIMAL2, PRIMAL3), Dual{TestTag()}(f(PRIMAL, PRIMAL2, PRIMAL3), PRIMAL2*PARTIALS))
@test dual_isapprox(f(PRIMAL, PRIMAL2, FDNUM3), Dual{TestTag()}(f(PRIMAL, PRIMAL2, PRIMAL3), PARTIALS3))
end

end # testset

end

#############
Expand Down

0 comments on commit bea4d64

Please sign in to comment.