Skip to content

Commit

Permalink
Improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
odow committed Dec 14, 2020
1 parent 9e4729a commit 5f991d8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/model.jl
Original file line number Diff line number Diff line change
Expand Up @@ -579,15 +579,17 @@ function test_copy_expr_aff()
model = Model()
@variable(model, x)
@expression(model, ex, 2 * x + 1)
new_model, _ = copy_model(model)
new_model, ref_map = copy_model(model)
@test ref_map[ex] == new_model[:ex]
@test new_model[:ex] == 2 * new_model[:x] + 1
end

function test_copy_expr_quad()
model = Model()
@variable(model, x)
@expression(model, ex, 2 * x^2 + x + 1)
new_model, _ = copy_model(model)
new_model, ref_map = copy_model(model)
@test ref_map[ex] == new_model[:ex]
@test new_model[:ex] == 2 * new_model[:x]^2 + new_model[:x] + 1
end

Expand Down

0 comments on commit 5f991d8

Please sign in to comment.