Skip to content

Commit 0e8167f

Browse files
authored
Update test_operate!.jl
1 parent e06bafd commit 0e8167f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

test/Utilities/test_operate!.jl

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -403,18 +403,16 @@ function test_operate_5a_VectorNonlinearFunction()
403403
x = MOI.ScalarNonlinearFunction(:+, Any[])
404404
f = MOI.VectorNonlinearFunction([x])
405405
g = MOI.Utilities.operate(vcat, Float64, f, f, x)
406-
h = MOI.VectorNonlinearFunction(
407-
[MOI.ScalarNonlinearFunction(:+, Any[]) for _ in 1:3],
408-
)
406+
rows = [MOI.ScalarNonlinearFunction(:+, Any[]) for _ in 1:3]
407+
h = MOI.VectorNonlinearFunction(rows)
409408
@test g h
410409
push!(x.args, 0.0)
411410
@test g h
412411
@test g.rows[1] !== g.rows[2]
413412
@test g.rows[1] !== g.rows[3]
414413
@test g.rows[2] !== g.rows[3]
415-
f_new = MOI.VectorNonlinearFunction(
416-
[MOI.ScalarNonlinearFunction(:+, Any[0.0])],
417-
)
414+
rows = [MOI.ScalarNonlinearFunction(:+, Any[0.0])]
415+
f_new = MOI.VectorNonlinearFunction(rows)
418416
@test f f_new
419417
return
420418
end

0 commit comments

Comments
 (0)