|
1 |
| -@testset "Return codes" begin |
2 |
| - alglist = ( |
3 |
| - LUFactorization, |
4 |
| - QRFactorization, |
5 |
| - DiagonalFactorization, |
6 |
| - DirectLdiv!, |
7 |
| - SparspakFactorization, |
8 |
| - KLUFactorization, |
9 |
| - UMFPACKFactorization, |
10 |
| - KrylovJL_GMRES, |
11 |
| - GenericLUFactorization, |
12 |
| - RFLUFactorization, |
13 |
| - LDLtFactorization, |
14 |
| - BunchKaufmanFactorization, |
15 |
| - CHOLMODFactorization, |
16 |
| - SVDFactorization, |
17 |
| - CholeskyFactorization, |
18 |
| - NormalCholeskyFactorization, |
19 |
| - AppleAccelerateLUFactorization, |
20 |
| - MKLLUFactorization, |
21 |
| - KrylovJL_CRAIGMR, |
22 |
| - KrylovJL_LSMR, |
23 |
| - ) |
| 1 | +using LinearSolve |
24 | 2 |
|
25 |
| - @testset "Success" begin |
26 |
| - for alg in alglist |
27 |
| - A = [2.0 1.0; -1.0 1.0] |
28 |
| - b = [-1.0, 1.0] |
29 |
| - prob = LinearProblem(A, b) |
30 |
| - linsolve = init(prob, alg) |
31 |
| - sol = solve!(linsolve) |
32 |
| - @test SciMLBase.successful_retcode(sol.retcode) || sol.retcode == ReturnCode.Default # The latter seems off... |
33 |
| - end |
| 3 | +alglist = ( |
| 4 | + LUFactorization, |
| 5 | + QRFactorization, |
| 6 | + DiagonalFactorization, |
| 7 | + DirectLdiv!, |
| 8 | + SparspakFactorization, |
| 9 | + KLUFactorization, |
| 10 | + UMFPACKFactorization, |
| 11 | + KrylovJL_GMRES, |
| 12 | + GenericLUFactorization, |
| 13 | + RFLUFactorization, |
| 14 | + LDLtFactorization, |
| 15 | + BunchKaufmanFactorization, |
| 16 | + CHOLMODFactorization, |
| 17 | + SVDFactorization, |
| 18 | + CholeskyFactorization, |
| 19 | + NormalCholeskyFactorization, |
| 20 | + AppleAccelerateLUFactorization, |
| 21 | + MKLLUFactorization, |
| 22 | + KrylovJL_CRAIGMR, |
| 23 | + KrylovJL_LSMR, |
| 24 | +) |
| 25 | + |
| 26 | +@testset "Success" begin |
| 27 | + for alg in alglist |
| 28 | + A = [2.0 1.0; -1.0 1.0] |
| 29 | + b = [-1.0, 1.0] |
| 30 | + prob = LinearProblem(A, b) |
| 31 | + linsolve = init(prob, alg) |
| 32 | + sol = solve!(linsolve) |
| 33 | + @test SciMLBase.successful_retcode(sol.retcode) || sol.retcode == ReturnCode.Default # The latter seems off... |
34 | 34 | end
|
| 35 | +end |
35 | 36 |
|
36 |
| - @testset "Failure" begin |
37 |
| - for alg in alglist |
38 |
| - A = [1.0 1.0; 1.0 1.0] |
39 |
| - b = [-1.0, 1.0] |
40 |
| - prob = LinearProblem(A, b) |
41 |
| - linsolve = init(prob, alg) |
42 |
| - sol = solve!(linsolve) |
43 |
| - @test !SciMLBase.successful_retcode(sol.retcode) |
44 |
| - end |
| 37 | +@testset "Failure" begin |
| 38 | + for alg in alglist |
| 39 | + A = [1.0 1.0; 1.0 1.0] |
| 40 | + b = [-1.0, 1.0] |
| 41 | + prob = LinearProblem(A, b) |
| 42 | + linsolve = init(prob, alg) |
| 43 | + sol = solve!(linsolve) |
| 44 | + @test !SciMLBase.successful_retcode(sol.retcode) |
45 | 45 | end
|
46 | 46 | end
|
0 commit comments