Skip to content

Commit

Permalink
Update interface.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas authored Jan 30, 2025
1 parent d1cde0a commit bbfa7d6
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions test/interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,15 @@ end
@inferred QuinticHermiteSpline(ddu, du, u, t)
end
end

@testset "Output Type" begin
# Test consistency between eltype(u) and type of the output
u = Float32[-0.676367f0, 0.8449812f0, 1.2366607f0, -0.13347931f0, 1.9928657f0,
-0.63596356f0, 0.76009744f0, -0.30632544f0, 0.34649512f0, -0.3846099f0]
t = 0.1f0:0.1f0:1.0f0
for extrapolation_flag in instances(ExtrapolationType.T)
(extrapolation_flag == ExtrapolationType.None) && continue
aki = AkimaInterpolation(u, t; extrapolation = extrapolation_flag)
@test eltype(aki.([-2.0f0, 0.5f0, 3.0f0])) == Float32
end
end

0 comments on commit bbfa7d6

Please sign in to comment.