Skip to content

Commit 9ed5aae

Browse files
committed
Use test_broken instead of commenting out the tests
1 parent ba40958 commit 9ed5aae

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

test/ADtests.jl

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -243,9 +243,9 @@ for consf in [cons, con2_c]
243243
@test lcons[2] consf(sol1.u, nothing)[2] ucons[2]
244244
end
245245

246-
#= --- These equality constraints are so fiddly. Can't get it to pass with consf(sol1.u, nothing)[1] ≈ lcons[1] rtol = 0.1 being true
247-
(I can get sol1.minimum ≈ sol2.minimum and sol1.u ≈ sol2.u, though, just not the constraint - or I can get the constraint and not
248-
sol1.minimum ≈ sol2.minimum, sol1.u ≈ sol2.u)
246+
# --- These equality constraints are so fiddly. Can't get it to pass with consf(sol1.u, nothing)[1] ≈ lcons[1] rtol = 0.1 being true
247+
# (I can get sol1.minimum ≈ sol2.minimum and sol1.u ≈ sol2.u, though, just not the constraint - or I can get the constraint and not
248+
# sol1.minimum ≈ sol2.minimum, sol1.u ≈ sol2.u)
249249
lcons = consf == cons ? [0.2] : [0.2, 0.5]
250250
ucons = consf == cons ? [0.2] : [0.2, 0.5]
251251
optf1 = OptimizationFunction(rosenbrock, Optimization.AutoFiniteDiff(); cons = consf)
@@ -254,11 +254,10 @@ for consf in [cons, con2_c]
254254
optf2 = OptimizationFunction(rosenbrock, Optimization.AutoForwardDiff(); cons = consf)
255255
prob2 = OptimizationProblem(optf2, [0.5, 0.5], lcons = lcons, ucons = ucons)
256256
sol2 = solve(prob2,Optim.IPNewton())
257-
@test sol1.minimum ≈ sol2.minimum
258-
@test sol1.u ≈ sol2.u
257+
@test_broken sol1.minimum sol2.minimum
258+
@test_broken sol1.u sol2.u
259259
@test consf(sol1.u, nothing)[1] lcons[1] rtol = 0.1
260260
if consf == con2_c
261-
@test consf(sol1.u, nothing)[2] ≈ lcons[2]
261+
@test_broken consf(sol1.u, nothing)[2] lcons[2]
262262
end
263-
=#
264263
end

0 commit comments

Comments
 (0)