diff --git a/src/abstractblockarray.jl b/src/abstractblockarray.jl index dfec90f7..89ec0c1d 100644 --- a/src/abstractblockarray.jl +++ b/src/abstractblockarray.jl @@ -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 ``` """ diff --git a/test/test_blockarrays.jl b/test/test_blockarrays.jl index 1241056c..6a5dc6e7 100644 --- a/test/test_blockarrays.jl +++ b/test/test_blockarrays.jl @@ -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))) @@ -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))