Skip to content

Commit 68f7a0b

Browse files
FiniteDiff can lead to non success criteria
1 parent 8a58c5f commit 68f7a0b

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test/ADtests.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,15 @@ end
4848

4949
sol = solve(prob, Optim.Newton())
5050
@test 10 * sol.objective < l1
51-
@test sol.retcode == ReturnCode.Success
51+
if adtype != AutoFiniteDiff()
52+
@test sol.retcode == ReturnCode.Success
53+
end
5254

5355
sol = solve(prob, Optim.KrylovTrustRegion())
5456
@test 10 * sol.objective < l1
55-
@test sol.retcode == ReturnCode.Success
57+
if adtype != AutoFiniteDiff()
58+
@test sol.retcode == ReturnCode.Success
59+
end
5660

5761
sol = solve(prob, Optimization.LBFGS(), maxiters = 1000)
5862
@test 10 * sol.objective < l1

0 commit comments

Comments
 (0)