File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -283,7 +283,10 @@ function runtests(
283283 Test. @test all (isnothing, MOI. get (model, attr, x))
284284 primal_start = fill (constraint_start, length (x))
285285 MOI. set (model, attr, x, primal_start)
286- Test. @test MOI. get (model, attr, x) ≈ primal_start
286+ if ! isempty (x)
287+ # ≈ does not work if x is empty because the return of get is Any[]
288+ Test. @test MOI. get (model, attr, x) ≈ primal_start
289+ end
287290 end
288291 # Test ConstraintPrimalStart and ConstraintDualStart
289292 for (F, S) in MOI. get (model, MOI. ListOfConstraintTypesPresent ())
Original file line number Diff line number Diff line change @@ -436,6 +436,19 @@ function test_runtests()
436436 VectorNonlinearFunction([-(2.1 * x - 1.0)]) in Nonnegatives(1)
437437 """ ,
438438 )
439+ MOI. Bridges. runtests (
440+ MOI. Bridges. Constraint. GreaterToLessBridge,
441+ model -> MOI. add_constraint (
442+ model,
443+ zero (MOI. ScalarAffineFunction{Float64}),
444+ MOI. GreaterThan (1.0 ),
445+ ),
446+ model -> MOI. add_constraint (
447+ model,
448+ zero (MOI. ScalarAffineFunction{Float64}),
449+ MOI. LessThan (- 1.0 ),
450+ ),
451+ )
439452 return
440453end
441454
You can’t perform that action at this time.
0 commit comments