Skip to content

Commit 0256272

Browse files
committed
Add tests for reduce_tup.
1 parent f3a4252 commit 0256272

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/runtests.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,13 @@ end
601601
@test ArrayInterface.deleteat((1, 2, 3), [1, 2]) == (3,)
602602
end
603603

604+
@testset "reduce_tup" begin
605+
for n 2:16
606+
x = ntuple(_ -> rand(Bool) ? rand() : (rand(Bool) ? rand(0x00:0x1f) : rand(0:31)), n)
607+
@test @inferred(ArrayInterface.reduce_tup(+, x)) reduce(+, x)
608+
end
609+
end
610+
604611
include("indexing.jl")
605612
include("dimensions.jl")
606613

0 commit comments

Comments
 (0)