Skip to content

Commit 589cf92

Browse files
committed
Fix test
1 parent 8361524 commit 589cf92

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

test/test_objective.jl

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,11 @@ end
2626

2727
function test_unsupported_function_in_macro()
2828
model = Model()
29-
@variable(model, x[1:2])
30-
exception = ErrorException(
31-
"The objective function `$VariableRef[x[1]," *
32-
" x[2]]` is not supported by JuMP.",
29+
@variable(model, x[1:2, 1:2])
30+
@test_throws(
31+
ErrorException("The objective function `$x` is not supported by JuMP."),
32+
@objective(model, Min, x),
3333
)
34-
@test_throws exception @objective(model, Min, x)
3534
return
3635
end
3736

0 commit comments

Comments
 (0)