Skip to content

Commit

Permalink
Fix derivative tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Oct 5, 2024
1 parent f0ef765 commit a883ffe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions test/derivative_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,11 @@ end

@testset "Constant Interpolation" begin
u = [0.0, 2.0, 1.0, 3.0, 2.0, 6.0, 5.5, 5.5, 2.7, 5.1, 3.0]
t = collect(0.0:10.0)
t = collect(0.0:11.0)
A = ConstantInterpolation(u, t)
@test all(derivative.(Ref(A), t) .== 0.0)
t2 = collect(0.0:10.0)
@test all(isnan, derivative.(Ref(A), t))
@test all(derivative.(Ref(A), t2 .+ 0.1) .== 0.0)
end

@testset "Quadratic Spline" begin
Expand Down

0 comments on commit a883ffe

Please sign in to comment.