Skip to content

Commit

Permalink
on empty peaks: type fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tungli committed Sep 18, 2020
1 parent 3aaa850 commit fc628f4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/findpeaks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Macro specific to findpeaks function."
macro on_empty_return(peaks, x)
quote
if isempty($(esc(peaks)))
return (empty($(esc(x))), empty($(esc(x)), PeakInfo))
return ((), ())
end
end
end
Expand Down
4 changes: 2 additions & 2 deletions test/findpeaks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -104,13 +104,13 @@ end
x1 = Int64[]

@test isempty(findpeaks(y1)[1])
@test findpeaks(y1, x1)[1] == empty(x1)
@test findpeaks(y1, x1)[1] == ()

y2 = Integer[]
x2 = String[]

@test isempty(findpeaks(y2)[1])
@test findpeaks(y2, x2)[1] == empty(x2)
@test findpeaks(y2, x2)[1] == ()
end

@testset "$NAME Non-equal data lengths" begin
Expand Down

0 comments on commit fc628f4

Please sign in to comment.