From 82343091c698496946f08d8768db41defd835d96 Mon Sep 17 00:00:00 2001 From: Michael Abbott <32575566+mcabbott@users.noreply.github.com> Date: Mon, 16 May 2022 22:09:12 -0400 Subject: [PATCH] fix some complex tests --- test/DualTest.jl | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/DualTest.jl b/test/DualTest.jl index eba68b54..abf1e2af 100644 --- a/test/DualTest.jl +++ b/test/DualTest.jl @@ -461,7 +461,7 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false @test abs(NESTED_FDNUM) === NESTED_FDNUM if V != Int - for (M, f, arity) in DiffRules.diffrules(filter_modules = nothing) + @testset "$f" for (M, f, arity) in DiffRules.diffrules(filter_modules = nothing) if f in (:/, :rem2pi) continue # Skip these rules elseif !(isdefined(@__MODULE__, M) && isdefined(getfield(@__MODULE__, M), f)) @@ -521,10 +521,14 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false else @test dx isa Complex{<:Dual{TestTag()}} @test dy isa Complex{<:Dual{TestTag()}} - @test real(value(dx)) == real(actualval) - @test real(value(dy)) == real(actualval) - @test imag(value(dx)) == imag(actualval) - @test imag(value(dy)) == imag(actualval) + # @test real(value(dx)) == real(actualval) + # @test real(value(dy)) == real(actualval) + # @test imag(value(dx)) == imag(actualval) + # @test imag(value(dy)) == imag(actualval) + @test value(real(dx)) == real(actualval) + @test value(real(dy)) == real(actualval) + @test value(imag(dx)) == imag(actualval) + @test value(imag(dy)) == imag(actualval) @test partials(real(dx), 1) ≈ real(actualdx) nans=true @test partials(real(dy), 1) ≈ real(actualdy) nans=true @test partials(imag(dx), 1) ≈ imag(actualdx) nans=true