Skip to content

Commit

Permalink
Feature: Add Missing overloads (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
Expander authored Dec 2, 2024
1 parent d3632d3 commit 667c168
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/ClausenFunctions.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ include("Cl4.jl")
include("Cl5.jl")
include("Cl6.jl")
include("Cl.jl")
include("Missing.jl")
include("Series.jl")
include("Sl.jl")

Expand Down
7 changes: 7 additions & 0 deletions src/Missing.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
for f in (:cl1, :cl2, :cl3, :cl4, :cl5, :cl6)
@eval $(f)(::Missing) = missing
end

for f in (:cl, :sl)
@eval $(f)(::Integer, ::Missing) = missing
end
13 changes: 13 additions & 0 deletions test/Missing.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
@testset "Missing" begin
@test ismissing(ClausenFunctions.cl1(missing))
@test ismissing(ClausenFunctions.cl2(missing))
@test ismissing(ClausenFunctions.cl3(missing))
@test ismissing(ClausenFunctions.cl4(missing))
@test ismissing(ClausenFunctions.cl5(missing))
@test ismissing(ClausenFunctions.cl6(missing))

for n in -16:16
@test ismissing(ClausenFunctions.cl(n, missing))
@test ismissing(ClausenFunctions.sl(n, missing))
end
end
1 change: 1 addition & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ include("Cl4.jl")
include("Cl5.jl")
include("Cl6.jl")
include("Cl.jl")
include("Missing.jl")
include("Sl.jl")
include("range_reduction.jl")

0 comments on commit 667c168

Please sign in to comment.