Skip to content

Commit 49b6909

Browse files
authored
Update functions.jl
1 parent 6a579fd commit 49b6909

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/Utilities/functions.jl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1873,6 +1873,19 @@ function test_ScalarNonlinearFunction_count_map_indices_and_print()
18731873
return
18741874
end
18751875

1876+
function test_vector_type()
1877+
for T in (Int, Float64)
1878+
@test MOI.Utilies.vector_type(T) == Vector{T}
1879+
@test MOI.Utilies.vector_type(MOI.VariableIndex) ==
1880+
MOI.VectorOfVariables
1881+
@test MOI.Utilies.vector_type(MOI.ScalarAffineFunction{T}) ==
1882+
MOI.VectorAffineFunction{T}
1883+
@test MOI.Utilies.vector_type(MOI.ScalarQuadraticFunction{T}) ==
1884+
MOI.VectorQuadraticFunction{T}
1885+
end
1886+
return
1887+
end
1888+
18761889
end # module
18771890

18781891
TestFunctions.runtests()

0 commit comments

Comments
 (0)