From 9e4aa9a74e013f59d83cddb6bcdf3bb8a0b312be Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Mon, 8 Dec 2025 16:30:21 +1300 Subject: [PATCH] [Test] allow skipping ConstraintDual in test_vector_nonlinear_oracle_ --- src/Test/test_nonlinear.jl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Test/test_nonlinear.jl b/src/Test/test_nonlinear.jl index 609dccb5bc..e3a1ce7953 100644 --- a/src/Test/test_nonlinear.jl +++ b/src/Test/test_nonlinear.jl @@ -2286,7 +2286,9 @@ function test_vector_nonlinear_oracle( y_v = MOI.get.(model, MOI.VariablePrimal(), y) @test ≈(y_v, [x_v[1]^2, x_v[2]^2 + x_v[3]^3], config) @test ≈(MOI.get(model, MOI.ConstraintPrimal(), c), [x_v; y_v], config) - @test ≈(MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config) + if _supports(config, MOI.ConstraintDual) + @test ≈(MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config) + end return end @@ -2358,7 +2360,9 @@ function test_vector_nonlinear_oracle_no_hessian( y_v = MOI.get.(model, MOI.VariablePrimal(), y) @test ≈(y_v, [x_v[1]^2, x_v[2]^2 + x_v[3]^3], config) @test ≈(MOI.get(model, MOI.ConstraintPrimal(), c), [x_v; y_v], config) - @test ≈(MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config) + if _supports(config, MOI.ConstraintDual) + @test ≈(MOI.get(model, MOI.ConstraintDual(), c), zeros(T, 5), config) + end return end