Skip to content

Commit 4700883

Browse files
kshyattStefanKarpinski
authored andcommitted
Missing undef array init tests (#31704)
1 parent bb1cb52 commit 4700883

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

test/core.jl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -650,6 +650,18 @@ let
650650
@test isassigned(a,1)
651651
@test isassigned(a)
652652
@test !isassigned(a,2)
653+
a = Array{Float64}(undef, 2, 2, 2)
654+
@test isassigned(a,1)
655+
@test isassigned(a)
656+
@test !isassigned(a,9)
657+
a = Array{Float64}(undef, 1)
658+
@test isassigned(a,1)
659+
@test isassigned(a)
660+
@test !isassigned(a,2)
661+
a = Array{Float64}(undef, 2, 2, 2, 2)
662+
@test isassigned(a,1)
663+
@test isassigned(a)
664+
@test !isassigned(a,17)
653665
end
654666

655667
# isassigned, issue #11167

0 commit comments

Comments
 (0)