Skip to content

Commit 606c88f

Browse files
committed
Add comments on the disabled PLI tests
1 parent 5ff6bc4 commit 606c88f

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

test/abstractarray.jl

+14-14
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ A = rand(5,4,3)
1616
@test checkbounds(Bool, A, 2, 2, 2, 1) == true # extra indices
1717
@test checkbounds(Bool, A, 2, 2, 2, 2) == false
1818
@test checkbounds(Bool, A, 1, 1) == true # partial linear indexing (PLI)
19-
# @test checkbounds(Bool, A, 1, 12) == true # PLI
20-
# @test checkbounds(Bool, A, 5, 12) == true # PLI
19+
# @test checkbounds(Bool, A, 1, 12) == false # PLI TODO: Re-enable after partial linear indexing deprecation
20+
# @test checkbounds(Bool, A, 5, 12) == false # PLI TODO: Re-enable after partial linear indexing deprecation
2121
@test checkbounds(Bool, A, 1, 13) == false # PLI
22-
# @test checkbounds(Bool, A, 6, 12) == false # PLI
22+
# @test checkbounds(Bool, A, 6, 12) == false # PLI TODO: Re-enable after partial linear indexing deprecation
2323

2424
# single CartesianIndex
2525
@test checkbounds(Bool, A, CartesianIndex((1, 1, 1))) == true
@@ -31,15 +31,15 @@ A = rand(5,4,3)
3131
@test checkbounds(Bool, A, CartesianIndex((5, 5, 3))) == false
3232
@test checkbounds(Bool, A, CartesianIndex((5, 4, 4))) == false
3333
@test checkbounds(Bool, A, CartesianIndex((1,))) == true
34-
# @test checkbounds(Bool, A, CartesianIndex((60,))) == true
34+
# @test checkbounds(Bool, A, CartesianIndex((60,))) == false # TODO: Re-enable after partial linear indexing deprecation
3535
@test checkbounds(Bool, A, CartesianIndex((61,))) == false
3636
@test checkbounds(Bool, A, CartesianIndex((2, 2, 2, 1,))) == true
3737
@test checkbounds(Bool, A, CartesianIndex((2, 2, 2, 2,))) == false
3838
@test checkbounds(Bool, A, CartesianIndex((1, 1,))) == true
39-
# @test checkbounds(Bool, A, CartesianIndex((1, 12,))) == true
40-
# @test checkbounds(Bool, A, CartesianIndex((5, 12,))) == true
39+
# @test checkbounds(Bool, A, CartesianIndex((1, 12,))) == false # TODO: Re-enable after partial linear indexing deprecation
40+
# @test checkbounds(Bool, A, CartesianIndex((5, 12,))) == false # TODO: Re-enable after partial linear indexing deprecation
4141
@test checkbounds(Bool, A, CartesianIndex((1, 13,))) == false
42-
# @test checkbounds(Bool, A, CartesianIndex((6, 12,))) == false
42+
# @test checkbounds(Bool, A, CartesianIndex((6, 12,))) == false # TODO: Re-enable after partial linear indexing deprecation
4343

4444
# mix of CartesianIndex and Int
4545
@test checkbounds(Bool, A, CartesianIndex((1,)), 1, CartesianIndex((1,))) == true
@@ -64,9 +64,9 @@ A = rand(5,4,3)
6464
@test checkbounds(Bool, A, 2, 2, 2, 1:1) == true # extra indices
6565
@test checkbounds(Bool, A, 2, 2, 2, 1:2) == false
6666
@test checkbounds(Bool, A, 1:5, 1:4) == true
67-
# @test checkbounds(Bool, A, 1:5, 1:12) == true
67+
# @test checkbounds(Bool, A, 1:5, 1:12) == false # TODO: Re-enable after partial linear indexing deprecation
6868
@test checkbounds(Bool, A, 1:5, 1:13) == false
69-
# @test checkbounds(Bool, A, 1:6, 1:12) == false
69+
# @test checkbounds(Bool, A, 1:6, 1:12) == false # TODO: Re-enable after partial linear indexing deprecation
7070

7171
# logical
7272
@test checkbounds(Bool, A, trues(5), trues(4), trues(3)) == true
@@ -77,9 +77,9 @@ A = rand(5,4,3)
7777
@test checkbounds(Bool, A, trues(61)) == false
7878
@test checkbounds(Bool, A, 2, 2, 2, trues(1)) == true # extra indices
7979
@test checkbounds(Bool, A, 2, 2, 2, trues(2)) == false
80-
# @test checkbounds(Bool, A, trues(5), trues(12)) == true
80+
# @test checkbounds(Bool, A, trues(5), trues(12)) == false # TODO: Re-enable after partial linear indexing deprecation
8181
@test checkbounds(Bool, A, trues(5), trues(13)) == false
82-
# @test checkbounds(Bool, A, trues(6), trues(12)) == false
82+
# @test checkbounds(Bool, A, trues(6), trues(12)) == false # TODO: Re-enable after partial linear indexing deprecation
8383
@test checkbounds(Bool, A, trues(5, 4, 3)) == true
8484
@test checkbounds(Bool, A, trues(5, 4, 2)) == false
8585
@test checkbounds(Bool, A, trues(5, 12)) == false
@@ -358,8 +358,8 @@ function test_vector_indexing{T}(::Type{T}, shape, ::Type{TestAbstractArray})
358358
@test B[vec(idxs)] == A[vec(idxs)] == vec(idxs)
359359
@test B[:] == A[:] == collect(1:N)
360360
@test B[1:end] == A[1:end] == collect(1:N)
361-
# @test B[:,:] == A[:,:] == reshape(1:N, shape[1], prod(shape[2:end]))
362-
# @test B[1:end,1:end] == A[1:end,1:end] == reshape(1:N, shape[1], prod(shape[2:end]))
361+
# @test B[:,:] == A[:,:] == reshape(1:N, shape[1], prod(shape[2:end])) # TODO: Re-enable after partial linear indexing deprecation
362+
# @test B[1:end,1:end] == A[1:end,1:end] == reshape(1:N, shape[1], prod(shape[2:end])) # TODO: Re-enable after partial linear indexing deprecation
363363
# Test with containers that aren't Int[]
364364
@test B[[]] == A[[]] == []
365365
@test B[convert(Array{Any}, idxs)] == A[convert(Array{Any}, idxs)] == idxs
@@ -373,7 +373,7 @@ function test_vector_indexing{T}(::Type{T}, shape, ::Type{TestAbstractArray})
373373
# test removing dimensions with 0-d arrays
374374
idx0 = reshape([rand(1:size(A, 1))])
375375
@test B[idx0, idx2] == A[idx0, idx2] == reshape(A[idx0[], vec(idx2)], 4, 5) == reshape(B[idx0[], vec(idx2)], 4, 5)
376-
# @test B[reshape([end]), reshape([end])] == A[reshape([end]), reshape([end])] == reshape([A[end,end]]) == reshape([B[end,end]])
376+
# @test B[reshape([end]), reshape([end])] == A[reshape([end]), reshape([end])] == reshape([A[end,end]]) == reshape([B[end,end]]) # TODO: Re-enable after partial linear indexing deprecation
377377

378378
# test logical indexing
379379
mask = bitrand(shape)

test/subarray.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ Y = 4:-1:1
485485
@test X[1:end] == @view X[1:end]
486486
@test X[1:end-3] == @view X[1:end-3]
487487
@test X[1:end,2,2] == @view X[1:end,2,2]
488-
# @test X[1,1:end-2] == @view X[1,1:end-2]
488+
# @test X[1,1:end-2] == @view X[1,1:end-2] # TODO: Re-enable after partial linear indexing deprecation
489489
@test X[1,2,1:end-2] == @view X[1,2,1:end-2]
490490
@test X[1,2,Y[2:end]] == @view X[1,2,Y[2:end]]
491491
@test X[1:end,2,Y[2:end]] == @view X[1:end,2,Y[2:end]]

0 commit comments

Comments
 (0)