Skip to content

Commit

Permalink
Update
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Apr 2, 2024
1 parent ce437be commit 153c3e9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/MOI/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4693,6 +4693,8 @@ end
ScalarNonlinearFunction
=#

_supports_nonlinear() = get_version() >= v"41"

function MOI.supports_constraint(

Check warning on line 4698 in src/MOI/MOI_wrapper.jl

View check run for this annotation

Codecov / codecov/patch

src/MOI/MOI_wrapper.jl#L4698

Added line #L4698 was not covered by tests
::Optimizer,
::MOI.ScalarNonlinearFunction,
Expand All @@ -4702,7 +4704,7 @@ function MOI.supports_constraint(
MOI.EqualTo{Float64},
},
)
return true
return get_version() >= v"41"

Check warning on line 4707 in src/MOI/MOI_wrapper.jl

View check run for this annotation

Codecov / codecov/patch

src/MOI/MOI_wrapper.jl#L4707

Added line #L4707 was not covered by tests
end

const _FUNCTION_MAP = Dict(
Expand Down
5 changes: 4 additions & 1 deletion test/test_MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1045,7 +1045,7 @@ function test_name_empty_names()
end

function test_dummy_nlp()
if Xpress.get_version() < v"41"
if Xpress._supports_nonlinear()
return
end
model = Xpress.Optimizer(; OUTPUTLOG = 0)
Expand Down Expand Up @@ -2481,6 +2481,9 @@ function test_conflict_infeasible_bounds()
end

function test_nlp_constraint_log()
if Xpress._supports_nonlinear()
return
end
model = Xpress.Optimizer()
MOI.set(model, MOI.Silent(), true)
x = MOI.add_variable(model)
Expand Down

0 comments on commit 153c3e9

Please sign in to comment.