diff --git a/Project.toml b/Project.toml index 9cf73f6d..91ae9fed 100644 --- a/Project.toml +++ b/Project.toml @@ -42,8 +42,8 @@ RegularizationTools = "0.6" SafeTestsets = "0.1" StableRNGs = "1" Symbolics = "5.29, 6" -Test = "1" -Unitful = "1" +Test = "1.10" +Unitful = "1.21.1" Zygote = "0.6.70" julia = "1.10" diff --git a/src/interpolation_methods.jl b/src/interpolation_methods.jl index 282a2527..14467311 100644 --- a/src/interpolation_methods.jl +++ b/src/interpolation_methods.jl @@ -59,7 +59,7 @@ function _interpolate(A::LinearInterpolation{<:AbstractVector}, t::Number, igues idx = firstindex(A.u) t1 = t2 = oneunit(eltype(A.t)) u1 = u2 = oneunit(eltype(A.u)) - slope = t/t * get_parameters(A, idx) + slope = t / t * get_parameters(A, idx) else idx = get_idx(A, t, iguess) t1, t2 = A.t[idx], A.t[idx + 1] diff --git a/test/interpolation_tests.jl b/test/interpolation_tests.jl index 45c9ecc2..ab0819d5 100644 --- a/test/interpolation_tests.jl +++ b/test/interpolation_tests.jl @@ -108,7 +108,7 @@ end @test isnan(A(4.0)) u = [0.0, 1.0, 2.0, NaN] - A = LinearInterpolation(u, t; extrapolate = true) + A = LinearInterpolation(u, t; extrapolation = ExtrapolationType.Extension) @test A(1.0) == 0.0 @test A(2.0) == 1.0 @test A(3.0) == 2.0 @@ -146,9 +146,9 @@ end # NaN time value for Unitful arrays: issue #365 t = (0:3)u"s" # Unitful quantities - u = [0, -2, -1, -2]u"m" - A = LinearInterpolation(u, t; extrapolate = true) - @test isnan(A(NaN*u"s")) + u = [0, -2, -1, -2]u"m" + A = LinearInterpolation(u, t; extrapolation = ExtrapolationType.Extension) + @test isnan(A(NaN * u"s")) # Nan time value: t = 0.0:3 # Floats diff --git a/test/runtests.jl b/test/runtests.jl index 774ad497..33b9ab1c 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -7,8 +7,8 @@ using SafeTestsets @safetestset "Derivative Tests" include("derivative_tests.jl") @safetestset "Integral Tests" include("integral_tests.jl") @safetestset "Integral Inverse Tests" include("integral_inverse_tests.jl") -@safetestset "Extrapolation" include("extrapolation_tests.jl") +@safetestset "Extrapolation Tests" include("extrapolation_tests.jl") @safetestset "Online Tests" include("online_tests.jl") -@safetestset "Regularization Smoothing" include("regularization.jl") -@safetestset "Show methods" include("show.jl") -@safetestset "Zygote support" include("zygote_tests.jl") +@safetestset "Regularization Smoothing Tests" include("regularization.jl") +@safetestset "Show methods Tests" include("show.jl") +@safetestset "Zygote support Tests" include("zygote_tests.jl")