Skip to content

Commit e2a393b

Browse files
committed
Add back Array-of-StaticArray tests
1 parent f90e612 commit e2a393b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/broadcast.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414
end
1515

1616
@testset "Broadcast" begin
17+
@testset "AbstractArray-of-StaticArray with scalar math" begin
18+
v = SVector{2,Float64}[SVector{2,Float64}(1,1)]
19+
@test @inferred(v .* 1.0)::typeof(v) == v
20+
@test @inferred(1 .- v)::typeof(v) == v .- v
21+
v2 = SVector{2,Int}[SVector{2,Int}(1,1)]
22+
@test @inferred(v2 .* 1.0)::typeof(v) == v
23+
end
24+
1725
@testset "2x2 StaticMatrix with StaticVector" begin
1826
m = @SMatrix [1 2; 3 4]
1927
v = SVector(1, 4)

0 commit comments

Comments
 (0)