Skip to content

Commit 4069cd5

Browse files
authored
Test mean of empty Union{}-eltyped collections (#40)
1 parent 42f4609 commit 4069cd5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/runtests.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,10 @@ end
120120
@test_throws MethodError mean([])
121121
@test_throws MethodError mean(skipmissing([]))
122122
@test_throws ArgumentError mean((1 for i in 2:1))
123+
if VERSION >= v"1.6.0-DEV.83"
124+
@test_throws ArgumentError mean(())
125+
@test_throws ArgumentError mean(Union{}[])
126+
end
123127

124128
# Check that small types are accumulated using wider type
125129
for T in (Int8, UInt8)

0 commit comments

Comments
 (0)