diff --git a/test/mapreduce.jl b/test/mapreduce.jl index 5c7c78ca..9589d351 100644 --- a/test/mapreduce.jl +++ b/test/mapreduce.jl @@ -90,10 +90,17 @@ using Statistics: mean # When the mapping and/or reducing functions are unsupported, # the error is thrown by `Base.mapreduce_empty`: - @test_throws( - ArgumentError("reducing over an empty collection is not allowed"), - mapreduce(nothing, nothing, SVector{0,Int}()) - ) + if Base.VERSION >= v"1.8.0-DEV.363" + @test_throws( + "reducing over an empty collection is not allowed", + mapreduce(nothing, nothing, SVector{0,Int}()) + ) + else + @test_throws( + ArgumentError("reducing over an empty collection is not allowed"), + mapreduce(nothing, nothing, SVector{0,Int}()) + ) + end end @testset "implemented by [map]reduce and [map]reducedim" begin