From a976a0ab8ec1cc38627835d13d8372d5300c758e Mon Sep 17 00:00:00 2001 From: N5N3 <2642243996@qq.com> Date: Tue, 11 Jan 2022 16:28:15 +0800 Subject: [PATCH] Add test --- test/reducedim.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/reducedim.jl b/test/reducedim.jl index e3179084990a4f..080926018e6730 100644 --- a/test/reducedim.jl +++ b/test/reducedim.jl @@ -544,3 +544,11 @@ end @testset "type stability (issue #43461)" begin @test (@inferred maximum(Float64, reshape(1:4,2,:); dims = 2)) == reshape([3,4],2,1) end + +@testset "Min/Max initialization test" begin + A = Vector{Union{Missing,Int}}(1:4) + A[2] = missing + @test @inferred(minimum(exp, A; dims = 1))[1] === missing + @test @inferred(maximum(exp, A; dims = 1))[1] === missing + @test @inferred(extrema(exp, A; dims = 1))[1] === (missing, missing) +end \ No newline at end of file