Skip to content

Commit

Permalink
improve coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
mlubin committed Jul 24, 2018
1 parent 02a848a commit c6ed762
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/nlp.jl
Expand Up @@ -128,6 +128,12 @@
@test_throws ErrorException @NLexpression(m, sum(x))
end

@testset "Error on non-scalar expressions" begin
m = Model()
x = [1,2,3]
@test_throws ErrorException @NLexpression(m, x + 1)
end

# Converts the lower-triangular sparse Hessian in MOI format into a dense
# matrix.
function dense_hessian(hessian_sparsity, V, n)
Expand Down

0 comments on commit c6ed762

Please sign in to comment.