Skip to content

Commit 676275b

Browse files
committed
Add some BitInteger range tests
1 parent 15548df commit 676275b

File tree

1 file changed

+25
-3
lines changed

1 file changed

+25
-3
lines changed

test/subarray.jl

+25-3
Original file line numberDiff line numberDiff line change
@@ -288,15 +288,15 @@ if testfull
288288
end
289289

290290
let B = copy(reshape(1:13^3, 13, 13, 13))
291-
@testset "spot checks: $oind" for oind in ((:,:,:),
291+
@testset "spot checks: $oind" for oind in (
292+
(:,:,:),
292293
(:,:,6),
293294
(:,6,:),
294295
(6,:,:),
295296
(:,3:7,:),
296297
(3:7,:,:),
297298
(3:7,6,:),
298299
(3:7,6,0x6),
299-
(6,UInt(3):UInt(7),3:7),
300300
(13:-2:1,:,:),
301301
([8,4,6,12,5,7],:,3:7),
302302
(6,CartesianIndex.(6,[8,4,6,12,5,7])),
@@ -307,7 +307,29 @@ let B = copy(reshape(1:13^3, 13, 13, 13))
307307
(3,reshape(2:11,5,2),4),
308308
(3,reshape(2:2:13,3,2),4),
309309
(view(1:13,[9,12,4,13,1]),2:6,4),
310-
([1:5 2:6 3:7 4:8 5:9], :, 3))
310+
([1:5 2:6 3:7 4:8 5:9], :, 3),
311+
)
312+
runsubarraytests(B, oind...)
313+
viewB = view(B, oind...)
314+
runviews(viewB, index5, index25, index125)
315+
end
316+
end
317+
318+
let B = copy(reshape(1:13^3, 13, 13, 13))
319+
@testset "spot checks (other BitIntegers): $oind" for oind in (
320+
(:,:,0x6),
321+
(:,0x00000006,:),
322+
(0x0006,:,:),
323+
(:,0x00000003:0x00000007,:),
324+
(0x0000000000000003:0x0000000000000007,:,:),
325+
(0x0003:0x0007,0x6,:),
326+
(6,UInt(3):UInt(7),3:7),
327+
(Int16(3):Int16(7),Int16(6),:),
328+
(CartesianIndex(0xD,0x6),UInt8[8,4,6,12,5,7]),
329+
(Int8(1),:,view(1:13,[9,12,4,13,1])),
330+
(view(1:13,Int16[9,12,4,13,1]),UInt8(2):UInt16(6),Int8(4)),
331+
(Int8[1:5 2:6 3:7 4:8 5:9],:,UInt64(3)),
332+
)
311333
runsubarraytests(B, oind...)
312334
viewB = view(B, oind...)
313335
runviews(viewB, index5, index25, index125)

0 commit comments

Comments
 (0)