Skip to content

Commit 2e44544

Browse files
Update retcodes.jl
1 parent 8ac858d commit 2e44544

File tree

1 file changed

+41
-41
lines changed

1 file changed

+41
-41
lines changed

test/retcodes.jl

+41-41
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
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
242

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...
3434
end
35+
end
3536

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)
4545
end
4646
end

0 commit comments

Comments
 (0)