Skip to content

Commit

Permalink
Expand tests for #39798
Browse files Browse the repository at this point in the history
  • Loading branch information
mkitti committed Feb 25, 2021
1 parent 1cb651d commit e34beeb
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/ranges.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1754,8 +1754,11 @@ end
end

@testset "Non-Int64 endpoints that are identical (#39798)" begin
for T in DataType[Float64,Int8,Int16,Int32,Int64,Int128,UInt8,UInt16,UInt32,UInt64],
r in [ LinRange(1, 1, 10), StepRangeLen(7, 0 , 5) ]
for T in DataType[Float16,Float32,Float64,Bool,Int8,Int16,Int32,Int64,Int128,UInt8,UInt16,UInt32,UInt64,UInt128],
r in [ LinRange(1, 1, 10), StepRangeLen(7, 0, 5) ]
if first(r) > typemax(T)
continue
end
let start=T(first(r)), stop=T(last(r)), step=T(step(r)), length=length(r)
@test range( start, stop, length) == r
@test range( start, stop; length) == r
Expand Down

0 comments on commit e34beeb

Please sign in to comment.