Skip to content

Test approximatively since isapprox(0.0, 1e-20) is false #744

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 23, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/Test/contquadratic.jl
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ function qcp1test(model::MOI.ModelLike, config::TestConfig)
@test MOI.get(model, MOI.ObjectiveSense()) == MOI.MAX_SENSE

if config.query
@test c2f ≈ MOI.get(model, MOI.ConstraintFunction(), c2)
@test c2f ≈ MOI.get(model, MOI.ConstraintFunction(), c2) atol=atol rtol=rtol
end

if config.solve
Expand Down Expand Up @@ -314,7 +314,7 @@ function qcp2test(model::MOI.ModelLike, config::TestConfig)
@test MOI.get(model, MOI.ObjectiveSense()) == MOI.MAX_SENSE

if config.query
@test cf ≈ MOI.get(model, MOI.ConstraintFunction(), c)
@test cf ≈ MOI.get(model, MOI.ConstraintFunction(), c) atol=atol rtol=rtol
end

if config.solve
Expand Down Expand Up @@ -366,7 +366,7 @@ function qcp3test(model::MOI.ModelLike, config::TestConfig)
@test MOI.get(model, MOI.ObjectiveSense()) == MOI.MIN_SENSE

if config.query
@test cf ≈ MOI.get(model, MOI.ConstraintFunction(), c)
@test cf ≈ MOI.get(model, MOI.ConstraintFunction(), c) atol=atol rtol=rtol
end

if config.solve
Expand Down Expand Up @@ -429,7 +429,7 @@ function _qcp4test(model::MOI.ModelLike, config::TestConfig, less_than::Bool)
@test MOI.get(model, MOI.ObjectiveSense()) == MOI.MAX_SENSE

if config.query
@test cf ≈ MOI.get(model, MOI.ConstraintFunction(), c)
@test cf ≈ MOI.get(model, MOI.ConstraintFunction(), c) atol=atol rtol=rtol
@test quad_set == MOI.get(model, MOI.ConstraintSet(), c)
end

Expand Down