Skip to content

Commit

Permalink
tests for #54244
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardssmith authored Apr 25, 2024
1 parent c1f1cd0 commit aa9c362
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7213,6 +7213,16 @@ end
@test_throws ArgumentError Array{Int, 2}(undef, -10, 0)
@test_throws ArgumentError Array{Int, 2}(undef, -1, -1)

# issue #54244
# test that zero sized array doesn't throw even with large axes
bignum = Int==Int64 ? 2^32 : 2^16
Array{Int}(undef, 0, bignum, bignum)
Array{Int}(undef, bignum, bignum, 0)
Array{Int}(undef, bignum, bignum, 0, bignum, bignum)
# but also test that it does throw if the axes multiply to a multiple of typemax(UInt)
@test_throws ArgumentError Array{Int, 2}(undef, bignum, bignum)
@test_throws ArgumentError Array{Int, 2}(undef, 1, bignum, bignum)

# issue #28812
@test Tuple{Vararg{Array{T} where T,3}} === Tuple{Array,Array,Array}

Expand Down

0 comments on commit aa9c362

Please sign in to comment.