Skip to content

Commit 067ad5c

Browse files
mcabbottoxinabox
authored andcommitted
fixes
1 parent 1ead5e2 commit 067ad5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/projection.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,7 @@ using OffsetArrays, BenchmarkTools
169169
bi = Bidiagonal(rand(3,3) .+ im, :L)
170170
@test pbi(bi) == real(bi) # reconstruct via generic_projector
171171
bu = Bidiagonal(rand(3,3) .+ im, :U) # differs but uplo, not type
172-
@test pbi(bu) == diagm(diag(real(bu)))
172+
@test pbi(bu) == diagm(0 => diag(real(bu)))
173173
@test_throws DimensionMismatch pbi(rand(ComplexF32, 3, 2))
174174

175175
pstri = ProjectTo(SymTridiagonal(Symmetric(rand(3,3))))
@@ -274,7 +274,7 @@ using OffsetArrays, BenchmarkTools
274274
@test 0 == @ballocated $padj(dx) setup=(dx=adjoint(rand(10^3)))
275275
@test 0 == @ballocated $padj(dx) setup=(dx=transpose(rand(10^3)))
276276

277-
@test 0 == @ballocated ProjectTo(x')(dx') setup=(x=rand(10^3); dx=rand(10^3))
277+
VERSION >= v"1.6" && @test 0 == @ballocated ProjectTo(x')(dx') setup=(x=rand(10^3); dx=rand(10^3))
278278

279279
pdiag = ProjectTo(Diagonal(rand(10^3)))
280280
@test 0 == @ballocated $pdiag(dx) setup=(dx=Diagonal(rand(10^3)))

0 commit comments

Comments
 (0)