Skip to content

Commit fda0401

Browse files
committed
Add tests for complex arrays
1 parent dbefc57 commit fda0401

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

test/diagonal.jl

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,16 +1258,18 @@ end
12581258
end
12591259

12601260
@testset "rmul!/lmul! for adj/trans" begin
1261-
A = rand(5,4); B = similar(A)
1262-
for f in (adjoint, transpose)
1263-
D = Diagonal(rand(size(A,1)))
1264-
B .= A
1265-
rmul!(f(B), D)
1266-
@test f(B) == f(A) * D
1267-
D = Diagonal(rand(size(A,2)))
1268-
B .= A
1269-
lmul!(D, f(B))
1270-
@test f(B) == D * f(A)
1261+
for T in (Float64, ComplexF64)
1262+
A = rand(T,5,4); B = similar(A)
1263+
for f in (adjoint, transpose)
1264+
D = Diagonal(rand(size(A,1)))
1265+
B .= A
1266+
rmul!(f(B), D)
1267+
@test f(B) == f(A) * D
1268+
D = Diagonal(rand(size(A,2)))
1269+
B .= A
1270+
lmul!(D, f(B))
1271+
@test f(B) == D * f(A)
1272+
end
12711273
end
12721274
end
12731275

0 commit comments

Comments
 (0)