Skip to content

Commit

Permalink
add zero-step range tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aplavin committed Aug 21, 2022
1 parent e9eeb44 commit e4b384e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/findall.jl
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ end
end
end

@testset "zero-step ranges" begin
r = range(1, 1, 10)
@test findall(in(1..3),r) == 1:10
@test findall(in(2..3),r) |> isempty
end

@testset "searchsorted" begin
x = [-10, 0, 1, 1 + eps(), 1.2, 1.5, 1.9, 2 - eps(), 2]
@test searchsorted_interval(x, -Inf..Inf) == 1:9
Expand Down

0 comments on commit e4b384e

Please sign in to comment.