From bf0e1583913f31b889e4d258cd26f67672cfd8e1 Mon Sep 17 00:00:00 2001 From: Oscar Dowson Date: Fri, 15 Mar 2024 20:22:13 +1300 Subject: [PATCH] Include qcqp.jl in tests (#116) --- test/qcqp.jl | 4 ++-- test/runtests.jl | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/qcqp.jl b/test/qcqp.jl index 6f48007..a7187d5 100644 --- a/test/qcqp.jl +++ b/test/qcqp.jl @@ -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 @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index f309e3e..99b61bb 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,3 +7,4 @@ include("Mock/mock_tests.jl") include("kkt.jl") include("sage.jl") +include("qcqp.jl")