Skip to content

Commit 8234309

Browse files
committed
fix some complex tests
1 parent bea4d64 commit 8234309

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

test/DualTest.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,7 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false
461461
@test abs(NESTED_FDNUM) === NESTED_FDNUM
462462

463463
if V != Int
464-
for (M, f, arity) in DiffRules.diffrules(filter_modules = nothing)
464+
@testset "$f" for (M, f, arity) in DiffRules.diffrules(filter_modules = nothing)
465465
if f in (:/, :rem2pi)
466466
continue # Skip these rules
467467
elseif !(isdefined(@__MODULE__, M) && isdefined(getfield(@__MODULE__, M), f))
@@ -521,10 +521,14 @@ ForwardDiff.:≺(::Int, ::Type{TestTag()}) = false
521521
else
522522
@test dx isa Complex{<:Dual{TestTag()}}
523523
@test dy isa Complex{<:Dual{TestTag()}}
524-
@test real(value(dx)) == real(actualval)
525-
@test real(value(dy)) == real(actualval)
526-
@test imag(value(dx)) == imag(actualval)
527-
@test imag(value(dy)) == imag(actualval)
524+
# @test real(value(dx)) == real(actualval)
525+
# @test real(value(dy)) == real(actualval)
526+
# @test imag(value(dx)) == imag(actualval)
527+
# @test imag(value(dy)) == imag(actualval)
528+
@test value(real(dx)) == real(actualval)
529+
@test value(real(dy)) == real(actualval)
530+
@test value(imag(dx)) == imag(actualval)
531+
@test value(imag(dy)) == imag(actualval)
528532
@test partials(real(dx), 1) real(actualdx) nans=true
529533
@test partials(real(dy), 1) real(actualdy) nans=true
530534
@test partials(imag(dx), 1) imag(actualdx) nans=true

0 commit comments

Comments
 (0)