diff --git a/src/Test/contlinear.jl b/src/Test/contlinear.jl index bc5954b5bc..08bd6fef50 100644 --- a/src/Test/contlinear.jl +++ b/src/Test/contlinear.jl @@ -1372,7 +1372,7 @@ end function linear13test(model::MOI.ModelLike, config::TestConfig) atol = config.atol rtol = config.rtol - # find x + # find x, y # s.t. 2x + 3y >= 1 # x - y == 0 @@ -1409,6 +1409,13 @@ function linear13test(model::MOI.ModelLike, config::TestConfig) @test c1sol >= 1 || isapprox(c1sol, 1.0, atol=atol, rtol=rtol) @test xsol - ysol ≈ 0 atol=atol rtol=rtol + @test MOI.canget(model, MOI.ConstraintPrimal(), typeof(c1)) + c1primval = MOI.get(model, MOI.ConstraintPrimal(), c1) + @test c1primval >= 1 || isapprox(c1sol, 1.0, atol=atol, rtol=rtol) + + @test MOI.canget(model, MOI.ConstraintPrimal(), typeof(c2)) + @test MOI.get(model, MOI.ConstraintPrimal(), c2) ≈ 0 atol=atol rtol=rtol + if config.duals @test MOI.canget(model, MOI.DualStatus()) @test MOI.get(model, MOI.DualStatus()) == MOI.FeasiblePoint