Skip to content

Commit e57bf7c

Browse files
committed
Update
1 parent a5ce641 commit e57bf7c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

test/Utilities/test_product_of_sets.jl

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -380,6 +380,25 @@ function test_zero_dimensional_function_only()
380380
return
381381
end
382382

383+
function test_ordered_product_of_sets_is_valid()
384+
sets = _VectorSets{Int}()
385+
i = MOI.Utilities.set_index(sets, MOI.Nonnegatives)
386+
MOI.Utilities.add_set(sets, i, 2)
387+
MOI.Utilities.final_touch(sets)
388+
F, S = MOI.VectorAffineFunction{Int}, MOI.Nonnegatives
389+
@test MOI.is_valid(model, MOI.ConstraintIndex{F,S}(1))
390+
for ci in MOI.ConstraintIndex[
391+
MOI.ConstraintIndex{MOI.VariableIndex,MOI.ZeroOne}(1),
392+
MOI.ConstraintIndex{F,S}(-1),
393+
MOI.ConstraintIndex{F,S}(0),
394+
MOI.ConstraintIndex{F,S}(2),
395+
MOI.ConstraintIndex{F,S}(12345),
396+
]
397+
@test !MOI.is_valid(model, ci)
398+
end
399+
return
400+
end
401+
383402
end
384403

385404
TestProductOfSets.runtests()

0 commit comments

Comments
 (0)