Skip to content

Commit

Permalink
remove test for SOneTo (JuliaArrays#301)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub committed Jun 6, 2022
1 parent 53dae74 commit 72cbffb
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 1 addition & 1 deletion src/axes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ IdOffsetRange(r::IdOffsetRange) = r

# Constructor to make `show` round-trippable
# try to preserve typeof(values) if the indices are known to be 1-based
_subtractindexoffset(values, indices::Base.OneTo, offset) = values
_subtractindexoffset(values, indices::Union{Base.OneTo, IdentityUnitRange{<:Base.OneTo}}, offset) = values
_subtractindexoffset(values, indices, offset) = _subtractoffset(values, offset)
function IdOffsetRange(; values::AbstractUnitRange{<:Integer}, indices::AbstractUnitRange{<:Integer})
length(values) == length(indices) || throw(ArgumentError("values and indices must have the same length"))
Expand Down
2 changes: 0 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,6 @@ end

p = IdOffsetRange(values = Base.OneTo(2), indices = Base.OneTo(2))
@test p isa IdOffsetRange{Int, Base.OneTo{Int}}
p = IdOffsetRange(values = SOneTo(2), indices = Base.OneTo(2))
@test p isa IdOffsetRange{Int, SOneTo{2}}

# conversion preserves both the values and the axes, throwing an error if this is not possible
@test @inferred(oftype(ro, ro)) === ro
Expand Down

0 comments on commit 72cbffb

Please sign in to comment.