Skip to content

Commit 7bdde22

Browse files
authored
Add a test for MOI.get! (#2659)
1 parent 5326595 commit 7bdde22

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/attributes.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -403,6 +403,16 @@ function test_CallbackVariablePrimal_is_set_by_optimize()
403403
return
404404
end
405405

406+
function test_get_bang()
407+
model = MOI.Utilities.Model{Float64}()
408+
x = MOI.add_variables(model, 2)
409+
MOI.set.(model, MOI.VariableName(), x, ["x", "y"])
410+
output = ["", ""]
411+
@test MOI.get!(output, model, MOI.VariableName(), x) === nothing
412+
@test output == ["x", "y"]
413+
return
414+
end
415+
406416
end # module
407417

408418
TestAttributes.runtests()

0 commit comments

Comments
 (0)