Skip to content

Commit

Permalink
Fix test for upcoming print changes in MOI (#3446)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Aug 8, 2023
1 parent c9df1ad commit 1efa172
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions test/test_model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -474,17 +474,12 @@ function test_bridge_graph_true()
@test sprint(print_bridge_graph, model) ==
"Bridge graph with 0 variable nodes, 0 constraint nodes and 0 objective nodes.\n"
c = @constraint(model, x in Nonnegative())
@test sprint(print_bridge_graph, model) == replace(
"Bridge graph with 1 variable nodes, 2 constraint nodes and 0 objective nodes.\n" *
" [1] constrained variables in `$(Nonnegative)` are supported (distance 2) by adding free variables and then constrain them, see (1).\n" *
" (1) `MOI.VariableIndex`-in-`$(Nonnegative)` constraints are bridged (distance 1) by $(NonnegativeBridge{Float64,MOI.VariableIndex}).\n" *
" (2) `MOI.ScalarAffineFunction{Float64}`-in-`$(Nonnegative)` constraints are bridged (distance 1) by $(NonnegativeBridge{Float64,MOI.ScalarAffineFunction{Float64}}).\n",
"MathOptInterface." => "MOI.",
)
@test occursin("$Nonnegative", sprint(print_bridge_graph, model))
optimize!(model)
@test 1.0 == @inferred value(x)
@test 1.0 == @inferred value(c)
@test 2.0 == @inferred dual(c)
return
end

function test_solve_time()
Expand Down

0 comments on commit 1efa172

Please sign in to comment.