Skip to content

Commit

Permalink
Fix rounding in test_heuristic_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Jun 16, 2024
1 parent 0a61aa2 commit 34a51c7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/MathOptInterface/callback.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ function test_lazy_constraint_callback()
model,
MOI.CallbackNodeStatus(cb_data),
)::MOI.CallbackNodeStatusCode
int_sol = round.(Int, [x_val, y_val])
if status == MOI.CALLBACK_NODE_STATUS_INTEGER
int_sol = round.(Int, [x_val, y_val])
@test isapprox(int_sol, [x_val, y_val], atol = 1e-6)
end
@test MOI.supports(model, MOI.LazyConstraint(cb_data))
Expand Down Expand Up @@ -291,8 +291,8 @@ function test_heuristic_callback()
model,
MOI.CallbackNodeStatus(cb_data),
)::MOI.CallbackNodeStatusCode
int_sol = round.(Int, x_vals)
if status == MOI.CALLBACK_NODE_STATUS_INTEGER
int_sol = round.(Int, x_vals)
@test isapprox(int_sol, x_vals, atol = 1e-6)
end
MOI.submit(
Expand Down

0 comments on commit 34a51c7

Please sign in to comment.