Skip to content

Commit

Permalink
Address comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
tkoolen committed Feb 20, 2018
1 parent 0e54a04 commit e40391e
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/Test/contlinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e40391e

Please sign in to comment.