Skip to content

Commit 109174b

Browse files
committed
Add test
1 parent 0cb6de6 commit 109174b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/interpolation_tests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -525,6 +525,13 @@ end
525525
itp = ConstantInterpolation([2], [0.0]; extrapolation = ExtrapolationType.Constant)
526526
@test itp(1.0) === 2
527527
@test itp(-1.0) === 2
528+
529+
# Test output type of vector evaluation (issue #388)
530+
u = [2, 3]
531+
t = [0.0, 1.0]
532+
itp = ConstantInterpolation(u, t)
533+
@test @inferred(itp(t)) == itp.(t)
534+
@test typeof(itp(t)) === typeof(itp.(t)) === Vector{Int}
528535
end
529536

530537
@testset "QuadraticSpline Interpolation" begin

0 commit comments

Comments
 (0)