Skip to content

Commit edac50c

Browse files
committed
add tests
1 parent 5823349 commit edac50c

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

test/runtests.jl

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,22 @@ using LinearSolve
22
using Test
33

44
@testset "LinearSolve.jl" begin
5-
A = rand(5, 5)
6-
b = rand(5)
5+
n = 10
6+
A = rand(n, n)
7+
b = rand(n)
78
prob = LinearProblem(A, b)
89

10+
x = rand(n)
11+
912
# Factorization
10-
@test A * solve(prob, LUFactorization(); alias_A = false, alias_b = false)
11-
b
12-
@test A * solve(prob, QRFactorization(); alias_A = false, alias_b = false)
13-
b
14-
@test A *
15-
solve(prob, SVDFactorization(); alias_A = false, alias_b = false) b
13+
@test A * solve(prob, LUFactorization();) b
14+
@test A * solve(prob, QRFactorization();) b
15+
@test A * solve(prob, SVDFactorization();) b
1616

1717
# Krylov
1818
@test A * solve(prob, KrylovJL(A, b)) b
19+
20+
# make algorithm callable - interoperable with DiffEq ecosystem
21+
@test A * LUFactorization()(x,A,b) b
22+
@test_broken A * x b # in place
1923
end

0 commit comments

Comments
 (0)