Skip to content

Commit d451668

Browse files
authored
Merge pull request #252 from scipopt/add-indicator-test-fix
adapt test to version
2 parents 3bb8d15 + 393b81c commit d451668

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

test/MOI_additional.jl

+7-5
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ end
318318
@test MOI.get(optimizer, MOI.DualStatus()) == MOI.NO_SOLUTION
319319
end
320320

321-
@testset "broken indicator test" for presolving in (-1, 0)
321+
@testset "broken indicator test" for presolving in (1, 0)
322322
model = MOIB.full_bridge_optimizer(SCIP.Optimizer(display_verblevel=0, presolving_maxrounds=presolving), Float64)
323323
config = MOIT.Config(atol=5e-3, rtol=1e-4, exclude=Any[
324324
MOI.ConstraintDual, MOI.ConstraintName, MOI.DualObjectiveValue, MOI.VariableBasisStatus, MOI.ConstraintBasisStatus,
@@ -380,16 +380,18 @@ end
380380
MOI.set(model, MOI.ObjectiveSense(), MOI.MAX_SENSE)
381381
@test MOI.get(model, MOI.TerminationStatus()) == MOI.OPTIMIZE_NOT_CALLED
382382
MOI.optimize!(model)
383-
if presolving == 0
383+
if presolving == 1 && v"8.0.1" <= SCIP.SCIP_versionnumber() <= v"8.0.2"
384+
@test_broken MOI.get(model, MOI.TerminationStatus()) == config.optimal_status
385+
@test_broken MOI.get(model, MOI.PrimalStatus()) == MOI.FEASIBLE_POINT
386+
else
387+
@info "presolving $presolving"
388+
@info "$(SCIP.SCIP_versionnumber())"
384389
@test MOI.get(model, MOI.TerminationStatus()) == config.optimal_status
385390
@test MOI.get(model, MOI.PrimalStatus()) == MOI.FEASIBLE_POINT
386391
@test (MOI.get(model, MOI.ObjectiveValue()), T(115 // 4), config)
387392
@test (MOI.get(model, MOI.VariablePrimal(), x1), T(5 // 4), config)
388393
@test (MOI.get(model, MOI.VariablePrimal(), x2), T(35 // 4), config)
389394
@test (MOI.get(model, MOI.VariablePrimal(), z1), T(1), config)
390395
@test (MOI.get(model, MOI.VariablePrimal(), z2), T(1), config)
391-
else
392-
@test_broken MOI.get(model, MOI.TerminationStatus()) == config.optimal_status
393-
@test_broken MOI.get(model, MOI.PrimalStatus()) == MOI.FEASIBLE_POINT
394396
end
395397
end

test/runtests.jl

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ end
1010

1111
@show(@eval(SCIP, libscip) == SCIP_jll.libscip)
1212
@show(SCIP_PaPILO_jll.is_available() && @eval(SCIP, libscip) == SCIP_PaPILO_jll.libscip)
13+
@show SCIP.SCIP_versionnumber()
1314

1415
@testset "MathOptInterface nonlinear expressions" begin
1516
include("MOI_nonlinear_exprs.jl")

0 commit comments

Comments
 (0)