From e40391ea6055745a44d269876bd6f3d1531ac848 Mon Sep 17 00:00:00 2001 From: Twan Koolen Date: Mon, 19 Feb 2018 22:38:06 -0500 Subject: [PATCH] Address comments. --- src/Test/contlinear.jl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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