Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/abstractblockarray.jl
Original file line number Diff line number Diff line change
Expand Up @@ -170,16 +170,16 @@ Return `true` if `Block.(index)` is within the bounds of `inds`.

# Examples
```jldoctest
julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:2), 1)
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:2,)), 1)
true

julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:2), 3)
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:2,)), 3)
false

julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:3), 2:3)
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:3,)), 2:3)
true

julia> BlockArrays.blockcheckindex(Bool, BlockRange(1:3), 2:4)
julia> BlockArrays.blockcheckindex(Bool, BlockRange((1:3,)), 2:4)
false
```
"""
Expand Down
16 changes: 8 additions & 8 deletions test/test_blockarrays.jl
Original file line number Diff line number Diff line change
Expand Up @@ -554,10 +554,10 @@ end
@test !checkbounds(Bool, BA_2, Block(1), Block(3))
@test_throws BlockBoundsError checkbounds(BA_2, Block(1), Block(3))

@test checkbounds(Bool, BA_2, BlockRange(1:2,1:2))
@test blockcheckbounds(Bool, BA_2, BlockRange(1:2,1:2))
@test isnothing(checkbounds(BA_2, BlockRange(1:2,1:2)))
@test isnothing(blockcheckbounds(BA_2, BlockRange(1:2,1:2)))
@test checkbounds(Bool, BA_2, BlockRange((1:2,1:2)))
@test blockcheckbounds(Bool, BA_2, BlockRange((1:2,1:2)))
@test isnothing(checkbounds(BA_2, BlockRange((1:2,1:2))))
@test isnothing(blockcheckbounds(BA_2, BlockRange((1:2,1:2))))
@test checkbounds(Bool, BA_2, Block.(1:2), Block.(1:2))
@test checkbounds(Bool, BA_2, Block.([1,2]), Block.([1,2]))
@test isnothing(checkbounds(BA_2, Block.(1:2), Block.(1:2)))
Expand All @@ -569,10 +569,10 @@ end
@test isnothing(blockcheckbounds(BA_2, [1,2], [1,2]))
@test isnothing(blockcheckbounds(BA_2, Block.([1,2]), Block.([1,2])))

@test !checkbounds(Bool, BA_2, BlockRange(1:2,1:3))
@test !blockcheckbounds(Bool, BA_2, BlockRange(1:2,1:3))
@test_throws BlockBoundsError checkbounds(BA_2, BlockRange(1:2,1:3))
@test_throws BlockBoundsError blockcheckbounds(BA_2, BlockRange(1:2,1:3))
@test !checkbounds(Bool, BA_2, BlockRange((1:2,1:3)))
@test !blockcheckbounds(Bool, BA_2, BlockRange((1:2,1:3)))
@test_throws BlockBoundsError checkbounds(BA_2, BlockRange((1:2,1:3)))
@test_throws BlockBoundsError blockcheckbounds(BA_2, BlockRange((1:2,1:3)))
@test !checkbounds(Bool, BA_2, Block.(1:2), Block.(1:3))
@test !checkbounds(Bool, BA_2, Block.([1,2]), Block.([1,3]))
@test_throws BlockBoundsError checkbounds(BA_2, Block.(1:2), Block.(1:3))
Expand Down
Loading