Skip to content
This repository has been archived by the owner on Feb 9, 2020. It is now read-only.

Add test for objective function with bad type #58

Merged
merged 1 commit into from
Feb 13, 2018
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
1 change: 1 addition & 0 deletions src/contlinear.jl
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ function linear1test(model::MOI.ModelLike, config::TestConfig)
vrs = MOI.get(model, MOI.ListOfVariableIndices())
@test vrs == v || vrs == reverse(v)

@test !MOI.canget(model, MOI.ObjectiveFunction{MOI.SingleVariable}())
@test MOI.canget(model, MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}())
@test objf ≈ MOI.get(model, MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Float64}}())

Expand Down