Skip to content

Commit 7762340

Browse files
committed
Tests for sparse matrices with Int64 and Int32 indices.
1 parent 3dbf8c5 commit 7762340

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

test/cg.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ end
5858
rmul!(rhs, inv(norm(rhs)))
5959
tol = 1e-5
6060

61-
@testset "Matrix" begin
61+
@testset "SparseMatrixCSC{$T, $Ti}" for T in (Float64, Float32), Ti in (Int64, Int32)
6262
xCG = cg(A, rhs; tol=tol, maxiter=100)
6363
xJAC = cg(A, rhs; Pl=P, tol=tol, maxiter=100)
6464
@test norm(A * xCG - rhs) tol

test/gmres.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ n = 10
3333
@test norm(A * x - b) / norm(b) tol
3434
end
3535

36-
@testset "SparseMatrixCSC{$T}" for T in (Float64, ComplexF64)
36+
@testset "SparseMatrixCSC{$T, $Ti}" for T in (Float64, ComplexF64), Ti in (Int64, Int32)
3737
A = sprand(T, n, n, 0.5) + I
3838
b = rand(T, n)
3939
F = lu(A)

test/idrs.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Random.seed!(1234567)
2929
end
3030
end
3131

32-
@testset "SparseMatrixCSC{$T}" for T in (Float64, ComplexF64)
32+
@testset "SparseMatrixCSC{$T, $Ti}" for T in (Float64, ComplexF64), Ti in (Int64, Int32)
3333
A = sprand(T, n, n, 0.5) + n * I
3434
b = rand(T, n)
3535
tol = eps(real(T))

test/minres.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ end
5151
@test hist.isconverged
5252
end
5353

54-
@testset "SparseMatrixCSC{$T}" for T in (Float32, Float64, ComplexF32, ComplexF64)
54+
@testset "SparseMatrixCSC{$T, $Ti}" for T in (Float32, Float64, ComplexF32, ComplexF64), Ti in (Int64, Int32)
5555
A = let
5656
B = sprand(n, n, 2 / n)
5757
B + B' + I

test/stationary.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ m = 6
1616
ω = 1.2
1717
Random.seed!(1234322)
1818

19-
@testset "SparseMatrix{$T}" for T in (Float32, Float64, ComplexF32, ComplexF64)
19+
@testset "SparseMatrix{$T, $Ti}" for T in (Float32, Float64, ComplexF32, ComplexF64), Ti in (Int64, Int32)
2020
@testset "Sparse? $sparse" for sparse = (true, false)
2121
# Diagonally dominant
2222
if sparse

0 commit comments

Comments
 (0)