Skip to content

Commit 6740036

Browse files
authored
Add missing @require in tests (#2195)
1 parent d48ac54 commit 6740036

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/Test/test_model.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -580,6 +580,7 @@ function test_model_copy_to_UnsupportedConstraint(
580580
model::MOI.ModelLike,
581581
::Config{T},
582582
) where {T}
583+
@requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T})
583584
@test !MOI.supports_constraint(
584585
model,
585586
MOI.VariableIndex,
@@ -608,6 +609,7 @@ function test_model_copy_to_UnsupportedAttribute(
608609
model::MOI.ModelLike,
609610
::Config{T},
610611
) where {T}
612+
@requires MOI.supports_constraint(model, MOI.VariableIndex, MOI.EqualTo{T})
611613
# ModelAttribute
612614
@test !MOI.supports(model, UnknownModelAttribute())
613615
@test_throws(
@@ -747,6 +749,11 @@ function test_model_ScalarFunctionConstantNotZero(
747749
config::Config{T},
748750
) where {T}
749751
@requires _supports(config, MOI.ScalarFunctionConstantNotZero)
752+
@requires MOI.supports_constraint(
753+
model,
754+
MOI.ScalarAffineFunction{T},
755+
MOI.EqualTo{T},
756+
)
750757
function _error(S, value)
751758
F = MOI.ScalarAffineFunction{T}
752759
return MOI.ScalarFunctionConstantNotZero{T,F,S}(value)

0 commit comments

Comments
 (0)