Skip to content

Commit

Permalink
Automate mock tests generation
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Jul 8, 2024
1 parent 8c5be8f commit 0a6d32a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/Tests/chebyshev.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function chebyshev_test(optimizer, config::MOI.Test.Config)

@objective(model, Max, γ)

JuMP.optimize!(model)
_optimize!(model, config)

@test JuMP.termination_status(model) == MOI.OPTIMAL
@test JuMP.primal_status(model) == MOI.FEASIBLE_POINT
Expand Down
5 changes: 5 additions & 0 deletions test/Tests/utilities.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ using Test, JuMP
import StarAlgebras as SA
using SumOfSquares

function _optimize!(model, config)
JuMP.optimize!(model)
return inner_variable_value(model, config.atol + config.rtol)
end

function _model(optimizer::MOI.AbstractOptimizer)
MOI.empty!(optimizer)
return direct_model(optimizer)
Expand Down

0 comments on commit 0a6d32a

Please sign in to comment.