Skip to content

Commit abdddcc

Browse files
committed
Update
1 parent 842e3c9 commit abdddcc

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/Bridges/bridge_optimizer.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,17 @@ function test_issue_2714()
14521452
return
14531453
end
14541454

1455+
function test_BridgeRequiresFiniteDomainError()
1456+
inner = MOI.Utilities.Model{Int}()
1457+
model = MOI.Bridges.Constraint.SOS1ToMILP{Int}(inner)
1458+
x = MOI.add_variables(model, 3)
1459+
c = MOI.add_constraint(model, MOI.VectorOfVariables(x), MOI.SOS1([1, 2, 3]))
1460+
err = MOI.Bridges.BridgeRequiresFiniteDomainError(model.map[c], x[1])
1461+
contents = sprint(showerror, err)
1462+
@test occursin("To fix this error, add a lower and upper bound", contents)
1463+
return
1464+
end
1465+
14551466
end # module
14561467

14571468
TestBridgeOptimizer.runtests()

0 commit comments

Comments
 (0)