Skip to content

Commit

Permalink
Improve test
Browse files Browse the repository at this point in the history
  • Loading branch information
hersle committed Aug 29, 2024
1 parent 3664e20 commit f0bcc47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/forwarddiff_symbolic_dual_ops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ end

# https://github.com/JuliaSymbolics/Symbolics.jl/issues/1246
@testset "isequal type ambiguity" begin
@variables x
xfunc(xval) = isequal(x, xval) ? xval : xval
@test ForwardDiff.derivative(xfunc, 0.0) == 1.0
@variables z
y(x) = isequal(z, x) ? 0 : x
@test ForwardDiff.derivative(y, 0) == 1 # expect ∂(x)/∂x
end

0 comments on commit f0bcc47

Please sign in to comment.