@@ -178,16 +178,10 @@ function _test_structural_identical(
178178 Test. @test (F, S) in b_constraint_types || MOI. get (a, attr) == 0
179179 end
180180 for (F, S) in b_constraint_types
181+ Test. @test haskey (constraints, (F, S))
181182 # Check that the same number of constraints are present
182183 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)
191185 # Check that supports_constraint is implemented
192186 Test. @test MOI. supports_constraint (b, F, S)
193187 # Check that each function in `b` matches a function in `a`
@@ -402,9 +396,7 @@ function _test_delete(Bridge, model, inner)
402396 MOI. delete .(model, MOI. get (model, MOI. ListOfConstraintIndices {F,S} ()))
403397 end
404398 # * 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 ()))
408400 # * And there should be the same number of variables
409401 attr = MOI. NumberOfVariables ()
410402 Test. @test MOI. get (inner, attr) == MOI. get (model, attr)
0 commit comments