Skip to content

Commit 9f04f17

Browse files
Lilith Hafnermbauman
authored andcommitted
test use mapslices instead of mapreduce for all/any
1 parent d694e02 commit 9f04f17

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/reduce.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,13 @@ end
681681
end
682682
end
683683

684+
@testset "issue #45562" begin
685+
@test all([true, true, true], dims = 1) == [true]
686+
@test any([true, true, true], dims = 1) == [true]
687+
@test_throws TypeError all([3, 3, 3], dims = 1)
688+
@test_throws TypeError any([3, 3, 3], dims = 1)
689+
end
690+
684691
# issue #45748
685692
@testset "foldl's stability for nested Iterators" begin
686693
a = Iterators.flatten((1:3, 1:3))

0 commit comments

Comments
 (0)