Skip to content

Commit 562fb53

Browse files
authored
Fix some broken tests introduced by #469 and #472 (#473)
#472 broken some tests and doctests introduced in #469, I accidentally merged #469 prematurely without checking that.
1 parent e9c28d4 commit 562fb53

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

src/abstractblockarray.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -170,16 +170,16 @@ Return `true` if `Block.(index)` is within the bounds of `inds`.
170170
171171
# Examples
172172
```jldoctest
173-
julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:2), 1)
173+
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:2,)), 1)
174174
true
175175
176-
julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:2), 3)
176+
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:2,)), 3)
177177
false
178178
179-
julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:3), 2:3)
179+
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:3,)), 2:3)
180180
true
181181
182-
julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:3), 2:4)
182+
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:3,)), 2:4)
183183
false
184184
```
185185
"""

test/test_blockarrays.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -554,10 +554,10 @@ end
554554
@test !checkbounds(Bool, BA_2, Block(1), Block(3))
555555
@test_throws BlockBoundsError checkbounds(BA_2, Block(1), Block(3))
556556

557-
@test checkbounds(Bool, BA_2, BlockRange(1:2,1:2))
558-
@test blockcheckbounds(Bool, BA_2, BlockRange(1:2,1:2))
559-
@test isnothing(checkbounds(BA_2, BlockRange(1:2,1:2)))
560-
@test isnothing(blockcheckbounds(BA_2, BlockRange(1:2,1:2)))
557+
@test checkbounds(Bool, BA_2, BlockRange((1:2,1:2)))
558+
@test blockcheckbounds(Bool, BA_2, BlockRange((1:2,1:2)))
559+
@test isnothing(checkbounds(BA_2, BlockRange((1:2,1:2))))
560+
@test isnothing(blockcheckbounds(BA_2, BlockRange((1:2,1:2))))
561561
@test checkbounds(Bool, BA_2, Block.(1:2), Block.(1:2))
562562
@test checkbounds(Bool, BA_2, Block.([1,2]), Block.([1,2]))
563563
@test isnothing(checkbounds(BA_2, Block.(1:2), Block.(1:2)))
@@ -569,10 +569,10 @@ end
569569
@test isnothing(blockcheckbounds(BA_2, [1,2], [1,2]))
570570
@test isnothing(blockcheckbounds(BA_2, Block.([1,2]), Block.([1,2])))
571571

572-
@test !checkbounds(Bool, BA_2, BlockRange(1:2,1:3))
573-
@test !blockcheckbounds(Bool, BA_2, BlockRange(1:2,1:3))
574-
@test_throws BlockBoundsError checkbounds(BA_2, BlockRange(1:2,1:3))
575-
@test_throws BlockBoundsError blockcheckbounds(BA_2, BlockRange(1:2,1:3))
572+
@test !checkbounds(Bool, BA_2, BlockRange((1:2,1:3)))
573+
@test !blockcheckbounds(Bool, BA_2, BlockRange((1:2,1:3)))
574+
@test_throws BlockBoundsError checkbounds(BA_2, BlockRange((1:2,1:3)))
575+
@test_throws BlockBoundsError blockcheckbounds(BA_2, BlockRange((1:2,1:3)))
576576
@test !checkbounds(Bool, BA_2, Block.(1:2), Block.(1:3))
577577
@test !checkbounds(Bool, BA_2, Block.([1,2]), Block.([1,3]))
578578
@test_throws BlockBoundsError checkbounds(BA_2, Block.(1:2), Block.(1:3))

0 commit comments

Comments
 (0)