Skip to content

Commit 51e8fb8

Browse files
committed
increase coverage
1 parent f62b2c7 commit 51e8fb8

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/blockbanded/blockbanded.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ BroadcastStyle(::Type{<:SubArray{T,N,Arr,<:NTuple{N,BlockSlice{BlockRange{1,Tupl
6464
LazyArrayStyle{N}()
6565

6666
# TODO: generalise following
67-
BroadcastStyle(::Type{<:BlockArray{T,N,<:AbstractArray{<:AbstractArray{T,N},N},NTuple{N,BlockedUnitRange{OneToInf{Int}}}}}) where {T,N} = LazyArrayStyle{N}()
68-
BroadcastStyle(::Type{<:PseudoBlockArray{T,N,<:AbstractArray{T,N},NTuple{N,BlockedUnitRange{OneToInf{Int}}}}}) where {T,N} = LazyArrayStyle{N}()
67+
BroadcastStyle(::Type{<:BlockArray{T,N,<:AbstractArray{<:AbstractArray{T,N},N},<:NTuple{N,BlockedUnitRange{<:InfRanges}}}}) where {T,N} = LazyArrayStyle{N}()
68+
BroadcastStyle(::Type{<:PseudoBlockArray{T,N,<:AbstractArray{T,N},<:NTuple{N,BlockedUnitRange{<:InfRanges}}}}) where {T,N} = LazyArrayStyle{N}()
6969
BroadcastStyle(::Type{<:BlockArray{T,N,<:AbstractArray{<:AbstractArray{T,N},N},<:NTuple{N,BlockedUnitRange{<:RangeCumsum{Int,<:InfRanges}}}}}) where {T,N} = LazyArrayStyle{N}()
7070
BroadcastStyle(::Type{<:PseudoBlockArray{T,N,<:AbstractArray{T,N},<:NTuple{N,BlockedUnitRange{<:RangeCumsum{Int,<:InfRanges}}}}}) where {T,N} = LazyArrayStyle{N}()
7171

test/runtests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@ end
4848
@test blockaxes(b,1) Block.(OneToInf())
4949
@test b[Block(5)] == [1,2]
5050
@test length(axes(b,1)) last(axes(b,1))
51+
@test Base.BroadcastStyle(typeof(b)) isa LazyArrayStyle{1}
5152
end
5253

5354
@testset "1:∞ blocks" begin
@@ -173,6 +174,13 @@ end
173174
= PseudoBlockArray(x, (axes(D,1),))
174175
@test (D * x)[1:10] == (D * x̃)[1:10]
175176
end
177+
178+
@testset "sortedunion" begin
179+
a = cumsum(1:2:∞)
180+
@test BlockArrays.sortedunion(a,a) a
181+
@test BlockArrays.sortedunion([∞],a) BlockArrays.sortedunion(a,[∞]) a
182+
@test BlockArrays.sortedunion([∞],[∞]) == [∞]
183+
end
176184
end
177185

178186
@testset "∞-Toeplitz and Pert-Toeplitz" begin

0 commit comments

Comments
 (0)