@@ -296,10 +296,32 @@ end
296
296
@test checkindex (Bool, b, Block (1 ))
297
297
@test checkindex (Bool, b, Block (3 ))
298
298
@test ! checkindex (Bool, b, Block (4 ))
299
+ # treat b as the array, and check against the axis of b
299
300
@test checkbounds (Bool, b, Block (1 )[1 ])
301
+ @test checkbounds (Bool, b, Block (1 )[1 : 1 ])
300
302
@test ! checkbounds (Bool, b, Block (1 )[2 ])
303
+ @test checkbounds (Bool, b, Block (2 )[1 ])
304
+ @test checkbounds (Bool, b, Block (2 )[1 : 2 ])
305
+ @test ! checkbounds (Bool, b, Block (2 )[3 ])
306
+ @test checkbounds (Bool, b, Block (3 )[1 ])
307
+ @test checkbounds (Bool, b, Block (3 )[3 ])
308
+ @test checkbounds (Bool, b, Block (3 )[1 : 3 ])
309
+ @test ! checkbounds (Bool, b, Block (3 )[4 ])
301
310
@test ! checkbounds (Bool, b, Block (0 )[1 ])
302
311
@test ! checkbounds (Bool, b, Block (1 )[0 ])
312
+ # treat b as the axis
313
+ @test checkindex (Bool, b, Block (1 )[1 ])
314
+ @test checkindex (Bool, b, Block (1 )[1 : 1 ])
315
+ @test ! checkindex (Bool, b, Block (1 )[2 ])
316
+ @test checkindex (Bool, b, Block (2 )[1 ])
317
+ @test checkindex (Bool, b, Block (2 )[1 : 2 ])
318
+ @test ! checkindex (Bool, b, Block (2 )[3 ])
319
+ @test checkindex (Bool, b, Block (3 )[1 ])
320
+ @test checkindex (Bool, b, Block (3 )[3 ])
321
+ @test checkindex (Bool, b, Block (3 )[1 : 3 ])
322
+ @test ! checkindex (Bool, b, Block (3 )[4 ])
323
+ @test ! checkindex (Bool, b, Block (0 )[1 ])
324
+ @test ! checkindex (Bool, b, Block (1 )[0 ])
303
325
end
304
326
305
327
@testset " Slice" begin
0 commit comments