@@ -178,16 +178,10 @@ function _test_structural_identical(
178
178
Test. @test (F, S) in b_constraint_types || MOI. get (a, attr) == 0
179
179
end
180
180
for (F, S) in b_constraint_types
181
+ Test. @test haskey (constraints, (F, S))
181
182
# Check that the same number of constraints are present
182
183
attr = MOI. NumberOfConstraints {F,S} ()
183
- if ! haskey (constraints, (F, S))
184
- # Constraint is reported in `b`, but not in `a`. Check that there
185
- # are no actual constraints in `b`.
186
- Test. @test MOI. get (b, attr) == 0
187
- continue
188
- else
189
- Test. @test MOI. get (a, attr) == MOI. get (b, attr)
190
- end
184
+ Test. @test MOI. get (a, attr) == MOI. get (b, attr)
191
185
# Check that supports_constraint is implemented
192
186
Test. @test MOI. supports_constraint (b, F, S)
193
187
# Check that each function in `b` matches a function in `a`
@@ -402,9 +396,7 @@ function _test_delete(Bridge, model, inner)
402
396
MOI. delete .(model, MOI. get (model, MOI. ListOfConstraintIndices {F,S} ()))
403
397
end
404
398
# * So now there should be no constraints in the problem
405
- for (F, S) in MOI. get (inner, MOI. ListOfConstraintTypesPresent ())
406
- Test. @test MOI. get (inner, MOI. NumberOfConstraints {F,S} ()) == 0
407
- end
399
+ Test. @test isempty (MOI. get (inner, MOI. ListOfConstraintTypesPresent ()))
408
400
# * And there should be the same number of variables
409
401
attr = MOI. NumberOfVariables ()
410
402
Test. @test MOI. get (inner, attr) == MOI. get (model, attr)
0 commit comments