Skip to content

Commit

Permalink
Use import MathOptInterface as MOI syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Nov 13, 2023
1 parent e24ac32 commit bfdb0f5
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 0 additions & 2 deletions src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Use of this source code is governed by an MIT-style license that can be found
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.

const MOI = MathOptInterface

include("scaled_psd_cone_bridge.jl")

MOI.Utilities.@product_of_sets(
Expand Down
2 changes: 1 addition & 1 deletion src/SCS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module SCS

import MathOptInterface
import MathOptInterface as MOI
import Requires
import SCS_jll
import SparseArrays
Expand Down
6 changes: 3 additions & 3 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
module TestSCS

using Test
using MathOptInterface
import MathOptInterface as MOI
import SCS

const MOI = MathOptInterface

function runtests()
for name in names(@__MODULE__; all = true)
if startswith("$(name)", "test_")
Expand Down Expand Up @@ -96,6 +94,7 @@ function test_RawOptimizerAttribute()
MOI.set(model, MOI.RawOptimizerAttribute("eps_abs"), 2.0)
@test MOI.get(model, MOI.RawOptimizerAttribute("eps_abs")) == 2.0
@test MOI.get(model, MOI.RawOptimizerAttribute("eps_abs")) == 2.0
return
end

function test_constrained_variables()
Expand Down Expand Up @@ -142,6 +141,7 @@ function test_unsupported()
MOI.set(model, MOI.Test.UnknownConstraintAttribute(), c, 1.0)
err = MOI.UnsupportedAttribute{MOI.Test.UnknownConstraintAttribute}
@test_throws err MOI.optimize!(optimizer, model)
return
end

function test_empty_problem()
Expand Down

0 comments on commit bfdb0f5

Please sign in to comment.