Skip to content

Commit

Permalink
extend first test (actually add variable)
Browse files Browse the repository at this point in the history
  • Loading branch information
rschwarz committed Dec 17, 2018
1 parent c1c5f8d commit 94749bc
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/direct_library_calls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,21 @@
@test rc == SCIP.SCIP_OKAY
var_ = var__[]
@test var_ != C_NULL
rc = SCIP.SCIPaddVar(scip_, var_)
@test rc == SCIP.SCIP_OKAY

rc = SCIP.SCIPsolve(scip_)
@test rc == SCIP.SCIP_OKAY

# check solution value
sol_ = SCIP.SCIPgetBestSol(scip_)
@test sol_ != C_NULL
# val = SCIP.SCIPgetSolVal(scip_, sol_, var_)
# @test val ≈ 3.0
val = SCIP.SCIPgetSolVal(scip_, sol_, var_)
@test val 3.0

# release variables and solver
rc = SCIP.SCIPreleaseVar(scip_, var__)
@test rc == SCIP.SCIP_OKAY
rc = SCIP.SCIPfree(scip__)
@test rc == SCIP.SCIP_OKAY
end

0 comments on commit 94749bc

Please sign in to comment.