Skip to content

Commit 32d074e

Browse files
More unit tests
1 parent d3ee5a6 commit 32d074e

File tree

1 file changed

+23
-2
lines changed

1 file changed

+23
-2
lines changed

test/runtests.jl

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,12 @@ using LinearAlgebra
44
using Test
55

66
@testset "ThreadedSparseArrays.jl" begin
7-
M,N = 5000,4000
7+
N = 4000
88
n = 200
99
T = ComplexF64
1010

1111
C = sprand(T, N, n, 0.05)
12-
@testset "$(Mat)" for Mat in [ThreadedSparseMatrixCSC, ThreadedColumnizedSparseMatrix]
12+
@testset "$(Mat)_R" for Mat in [ThreadedSparseMatrixCSC, ThreadedColumnizedSparseMatrix]
1313
Ct = Mat(C)
1414

1515
eye = Matrix(one(T)*I, N, N)
@@ -18,4 +18,25 @@ using Test
1818
ref = eye*C
1919
@test norm(ref-out) == 0
2020
end
21+
22+
@testset "$(Mat)_L" for Mat in [ThreadedSparseMatrixCSC]
23+
Ct = Mat(C)
24+
25+
eye = Matrix(one(T)*I, n, n)
26+
out = zeros(T, N, n)
27+
LinearAlgebra.mul!(out, Ct, eye)
28+
ref = C*eye
29+
@test norm(ref-out) == 0
30+
end
31+
32+
@testset "$(Mat)_L_$(op)" for op in [adjoint,transpose], Mat in [ThreadedSparseMatrixCSC]
33+
Ct = Mat(C)
34+
35+
eye = Matrix(one(T)*I, N, N)
36+
out = zeros(T, n, N)
37+
LinearAlgebra.mul!(out, op(Ct), eye)
38+
ref = op(C)*eye
39+
@test norm(ref-out) == 0
40+
end
41+
2142
end

0 commit comments

Comments
 (0)