@@ -118,14 +118,10 @@ function test_runtests_error_variable()
118118 model = MOI. Bridges. Constraint. BinPackingToMILP {Int} (inner)
119119 x = MOI. add_variables (model, 3 )
120120 f = MOI. VectorOfVariables (x)
121- MOI. add_constraint (model, f, MOI. BinPacking (3 , [1 , 2 , 3 ]))
122- BT =
123- MOI. Bridges. Constraint. BinPackingToMILPBridge{Int,MOI. VectorOfVariables}
121+ c = MOI. add_constraint (model, f, MOI. BinPacking (3 , [1 , 2 , 3 ]))
122+ BT = typeof (model. map[c])
124123 @test_throws (
125- ErrorException (
126- " Unable to use $BT because an element in the " *
127- " function has a non-finite domain: $(x[1 ]) " ,
128- ),
124+ MOI. Bridges. BridgeRequiresFiniteDomainError{BT,MOI. VariableIndex},
129125 MOI. Bridges. final_touch (model),
130126 )
131127 return
@@ -136,16 +132,11 @@ function test_runtests_error_affine()
136132 model = MOI. Bridges. Constraint. BinPackingToMILP {Int} (inner)
137133 x = MOI. add_variables (model, 2 )
138134 f = MOI. Utilities. operate (vcat, Int, 2 , 1 * x[1 ], x[2 ])
139- MOI. add_constraint (model, f, MOI. BinPacking (3 , [1 , 2 , 3 ]))
140- BT = MOI. Bridges. Constraint. BinPackingToMILPBridge{
141- Int,
142- MOI. VectorAffineFunction{Int},
143- }
135+ c = MOI. add_constraint (model, f, MOI. BinPacking (3 , [1 , 2 , 3 ]))
136+ BT = typeof (model. map[c])
137+ F = MOI. ScalarAffineFunction{Int}
144138 @test_throws (
145- ErrorException (
146- " Unable to use $BT because an element in the " *
147- " function has a non-finite domain: $(1 * x[1 ]) " ,
148- ),
139+ MOI. Bridges. BridgeRequiresFiniteDomainError{BT,F},
149140 MOI. Bridges. final_touch (model),
150141 )
151142 return
0 commit comments