Skip to content

Commit

Permalink
Add test
Browse files Browse the repository at this point in the history
  • Loading branch information
N5N3 committed Jan 15, 2022
1 parent 05a1eae commit a976a0a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/reducedim.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a976a0a

Please sign in to comment.