|
109 | 109 | @test @inferred(v2 .- v1) === SVector(0, 2) |
110 | 110 | @test @inferred(v1 .^ v2) === SVector(1, 16) |
111 | 111 | @test @inferred(v2 .^ v1) === SVector(1, 16) |
112 | | - # Issue #199: broadcast with empty SArray |
113 | | - @test @inferred(SVector(1) .+ SVector{0,Int}()) === SVector{0,Union{}}() |
114 | | - @test @inferred(SVector{0,Int}() .+ SVector(1)) === SVector{0,Union{}}() |
115 | 112 | # Issue #200: broadcast with Adjoint |
116 | 113 | @test @inferred(v1 .+ v2') === @SMatrix [2 5; 3 6] |
117 | 114 | @test @inferred(v1 .+ transpose(v2)) === @SMatrix [2 5; 3 6] |
|
142 | 139 | @test @inferred(zeros(SVector{0}) .+ zeros(SMatrix{0,2})) === zeros(SMatrix{0,2}) |
143 | 140 | m = zeros(MMatrix{0,2}) |
144 | 141 | @test @inferred(broadcast!(+, m, m, zeros(SVector{0}))) == zeros(SMatrix{0,2}) |
| 142 | + # Issue #199: broadcast with empty SArray |
| 143 | + @test @inferred(SVector(1) .+ SVector{0,Int}()) === SVector{0,Int}() |
| 144 | + @test @inferred(SVector{0,Int}() .+ SVector(1.0)) === SVector{0,Float64}() |
| 145 | + # Issue #528 |
| 146 | + @test @inferred(isapprox(SMatrix{3,0,Float64}(), SMatrix{3,0,Float64}())) |
| 147 | + @test @inferred(broadcast(length, SVector{0,String}())) === SVector{0,Int}() |
| 148 | + @test @inferred(broadcast(join, SVector{0,String}(), SVector{0,String}(), SVector{0,String}())) === SVector{0,String}() |
145 | 149 | end |
146 | 150 |
|
147 | 151 | @testset "Mutating broadcast!" begin |
|
0 commit comments