Skip to content

Commit

Permalink
add vararg tests
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith committed Jun 16, 2023
1 parent 70c1d0c commit b2159f2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/function_building_error_messages.jl
Original file line number Diff line number Diff line change
Expand Up @@ -463,3 +463,13 @@ optf(u) = 1.0
optf(u, p) = 1.0
OptimizationFunction(optf)
OptimizationProblem(optf, 1.0)

# Varargs
var1(u...) = 1.0
var2(u::Vararg{Any, N}) where N = 1.0
var3(u::Vararg{Int, N}) where N = 1.0
var4(u::Vararg{Vector{T}, N}) where {T, N} = 1.0
OptimizationFunction(var1)
OptimizationFunction(var2)
OptimizationFunction(var3)
OptimizationFunction(var4)

0 comments on commit b2159f2

Please sign in to comment.