Skip to content

Commit 6655ae9

Browse files
committed
Fix type mismatch in complex test cases
1 parent 91bf51e commit 6655ae9

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

test/basictests.jl

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,22 @@ const Dual64 = ForwardDiff.Dual{Nothing, Float64, 1}
99
n = 8
1010
A = Matrix(I, n, n)
1111
b = ones(n)
12+
# Real-valued systems
1213
A1 = A / 1;
1314
b1 = rand(n);
1415
x1 = zero(b);
16+
# A2 is similar to A1; created to test cache reuse
1517
A2 = A / 2;
1618
b2 = rand(n);
1719
x2 = zero(b);
18-
# Test system with complex numbers
19-
A3 = A .+ rand(n) .* im;
20-
b3 = rand(n);
21-
x3 = zero(b);
22-
# Test system with mixed types
23-
A4 = (A / 4) .|> Float32;
24-
b4 = rand(n) .|> Float32;
25-
x4 = zero(b) .|> Float32;
20+
# Complex systems + mismatch types with eltype(tol)
21+
A3 = (A .+ rand(n) .* im) .|> ComplexF32;
22+
b3 = rand(n) .|> ComplexF32;
23+
x3 = zero(b) .|> ComplexF32;
24+
# A4 is similar to A3; created to test cache reuse
25+
A4 = (A .+ rand(n) .* im) .|> ComplexF32;
26+
b4 = b3 / 4 .|> ComplexF32;
27+
x4 = zero(b) .|> ComplexF32;
2628

2729
prob1 = LinearProblem(A1, b1; u0 = x1)
2830
prob2 = LinearProblem(A2, b2; u0 = x2)

0 commit comments

Comments
 (0)