Skip to content

Commit

Permalink
Include qcqp.jl in tests (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Mar 15, 2024
1 parent f96a40b commit bf0e158
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/qcqp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function test_no_monomials(x, y, T)
return PolyJuMP.QCQP.Optimizer{T}(MOI.Utilities.MockOptimizer(inner))
end
PolyJuMP.@variable(model, 0 <= x[1:2] <= 1)
PolyJuMP.@constraint(model, x[1] * x[2] == 0.5)
PolyJuMP.@constraint(model, x[1] * x[2] == T(1))
PolyJuMP.@objective(model, Min, sum(x))
PolyJuMP.optimize!(model)
@test MOI.get(inner, MOI.NumberOfVariables()) == 2
Expand Down Expand Up @@ -209,7 +209,7 @@ function test_scalar_nonlinear_function(x, y, T)
PolyJuMP.@expression(model, g, x^2)
PolyJuMP.@constraint(model, f * g == 0)
PolyJuMP.optimize!(model)
F, S = ScalarQuadraticFunction{T}, EqualTo{T}
F, S = MOI.ScalarQuadraticFunction{T}, MOI.EqualTo{T}
@test MOI.get(inner, MOI.NumberOfConstraints{F,S}()) == 2
@test MOI.get(inner, MOI.NumberOfVariables()) == 2
return
Expand Down
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ include("Mock/mock_tests.jl")

include("kkt.jl")
include("sage.jl")
include("qcqp.jl")

0 comments on commit bf0e158

Please sign in to comment.