Skip to content

Commit 2318c56

Browse files
committed
Remove InfiniteArrays tests
1 parent a5215e2 commit 2318c56

File tree

3 files changed

+9
-11
lines changed

3 files changed

+9
-11
lines changed

Project.toml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ DistributedArrays = "0.6"
1313
Documenter = "0.27"
1414
EllipsisNotation = "1"
1515
FillArrays = "0.11, 0.13"
16-
InfiniteArrays = "0.12"
1716
StaticArrays = "1"
1817
julia = "0.7, 1"
1918

@@ -25,10 +24,9 @@ DistributedArrays = "aaf54ef3-cdf8-58ed-94cc-d582ad619b94"
2524
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
2625
EllipsisNotation = "da5c29d0-fa7d-589e-88eb-ea29b0a81949"
2726
FillArrays = "1a297f60-69ca-5386-bcde-b61e274b549b"
28-
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c"
2927
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
3028
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
3129
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
3230

3331
[targets]
34-
test = ["Aqua", "CatIndices", "DistributedArrays", "DelimitedFiles", "Documenter", "InfiniteArrays", "Test", "LinearAlgebra", "EllipsisNotation", "StaticArrays", "FillArrays"]
32+
test = ["Aqua", "CatIndices", "DistributedArrays", "DelimitedFiles", "Documenter", "Test", "LinearAlgebra", "EllipsisNotation", "StaticArrays", "FillArrays"]

src/axes.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,9 @@ if VERSION < v"1.8.2"
177177
end
178178
@inline Base.unsafe_indices(r::IdOffsetRange) = (axes1(r),)
179179
@inline Base.length(r::IdOffsetRange) = length(r.parent)
180-
@inline Base.checked_length(x::IdOffsetRange) = Base.checked_length(x.parent)
180+
if VERSION >= v"1.7"
181+
@inline Base.checked_length(x::IdOffsetRange) = Base.checked_length(x.parent)
182+
end
181183
@inline Base.isempty(r::IdOffsetRange) = isempty(r.parent)
182184
#= We specialize on reduced_indices to work around cases where the parent axis type doesn't
183185
support reduced_index, but the axes do support reduced_indices

test/runtests.jl

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ using DistributedArrays
77
using Documenter
88
using EllipsisNotation
99
using FillArrays
10-
using InfiniteArrays
1110
using LinearAlgebra
1211
using OffsetArrays
1312
using OffsetArrays: IdentityUnitRange, no_offset_view, IIUR, Origin, IdOffsetRange
@@ -403,16 +402,15 @@ end
403402
@test C[ind] == C[5]
404403
end
405404

406-
@testset "Infinite ranges" begin
407-
x = 1:
405+
@testset "Iterator" begin
406+
x = 1:4
408407
y = IdOffsetRange(x)
409408
@test y[2] == x[2]
410409
@test first(x,2) == first(y,2)
411410
@test Base.IteratorSize(y) == Base.IteratorSize(x)
412-
stry = repr(y)
413-
strx = repr(x)
414-
@test contains(stry, "values=$strx")
415-
@test contains(stry, "indices=$strx")
411+
s = Iterators.Stateful(y)
412+
@test first(s, 2) == y[begin .+ (0:1)]
413+
@test first(s, 2) == y[begin .+ (2:3)]
416414
end
417415
end
418416

0 commit comments

Comments
 (0)