Skip to content

Commit e9ea5c5

Browse files
authored
[Test] allow skipping ConstraintDual in test_vector_nonlinear_oracle_ (#2899)
1 parent 84db119 commit e9ea5c5

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/Test/test_nonlinear.jl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2286,7 +2286,9 @@ function test_vector_nonlinear_oracle(
22862286
y_v = MOI.get.(model, MOI.VariablePrimal(), y)
22872287
@test (y_v, [x_v[1]^2, x_v[2]^2 + x_v[3]^3], config)
22882288
@test (MOI.get(model, MOI.ConstraintPrimal(), c), [x_v; y_v], config)
2289-
@test (MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config)
2289+
if _supports(config, MOI.ConstraintDual)
2290+
@test (MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config)
2291+
end
22902292
return
22912293
end
22922294

@@ -2358,7 +2360,9 @@ function test_vector_nonlinear_oracle_no_hessian(
23582360
y_v = MOI.get.(model, MOI.VariablePrimal(), y)
23592361
@test (y_v, [x_v[1]^2, x_v[2]^2 + x_v[3]^3], config)
23602362
@test (MOI.get(model, MOI.ConstraintPrimal(), c), [x_v; y_v], config)
2361-
@test (MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config)
2363+
if _supports(config, MOI.ConstraintDual)
2364+
@test (MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config)
2365+
end
23622366
return
23632367
end
23642368

0 commit comments

Comments
 (0)