Skip to content

Commit

Permalink
Test new functionality.
Browse files Browse the repository at this point in the history
  • Loading branch information
lamorton committed Jul 25, 2021
1 parent cc19bf7 commit 4ef0ad8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions test/abstractarray.jl
Expand Up @@ -1287,6 +1287,14 @@ end
@test [1:BigInt(5); 1] == [1:5; 1]
end

@testset "zero for heterogeneous eltypes" begin
struct Numlike{T<:Number} <: Number
val::T
end
x = [Numlike(1), Numlike(1im)]
@test zero(x) == [Numlike(0), Numlike(0im)]
end

@testset "Base.isstored" begin
a = rand(3, 4, 5)
@test Base.isstored(a, 1, 2, 3)
Expand Down

0 comments on commit 4ef0ad8

Please sign in to comment.