Skip to content
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.

Commit

Permalink
add test for filtering empty iterator (JuliaLang#22528)
Browse files Browse the repository at this point in the history
  • Loading branch information
KristofferC authored and DrTodd13 committed Jun 26, 2017
1 parent 2fa4aa4 commit a7fd042
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/iterators.jl
Original file line number Diff line number Diff line change
Expand Up @@ -406,3 +406,9 @@ end
@testset "product iterator infinite loop" begin
@test collect(product(1:1, (1, "2"))) == [(1, 1) (1, "2")]
end

@testset "filter empty iterable #16704" begin
arr = filter(n -> true, 1:0)
@test length(arr) == 0
@test eltype(arr) == Int
end

0 comments on commit a7fd042

Please sign in to comment.