Skip to content

Commit 5dd7750

Browse files
authored
Merge pull request #212 from JuliaGPU/ksh/fix173
Fix #173, add test for Diagonal wrapper
2 parents 981bacb + 8555d01 commit 5dd7750

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/testsuite/linalg.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,15 @@ function test_linalg(AT)
2626
@test ishermitian(aherm)
2727
end
2828
end
29+
@testset "Array + Diagonal" begin
30+
n = 128
31+
A = AT{Float32}(undef, n, n)
32+
d = AT{Float32}(undef, n)
33+
rand!(A)
34+
rand!(d)
35+
D = Diagonal(d)
36+
B = A + D
37+
@test collect(B) collect(A) + collect(D)
38+
end
2939
end
3040
end

0 commit comments

Comments
 (0)