Skip to content

Commit 5fa23da

Browse files
andreasnoackKristofferC
authored and
KristofferC
committed
Reduce number of test combinations in test/triangular.jl (#1123)
(cherry picked from commit aecb714)
1 parent 4a952ab commit 5fa23da

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

test/triangular.jl

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,9 @@ debug && println("Test basic type functionality")
330330
(UnitUpperTriangular, :U),
331331
(LowerTriangular, :L),
332332
(UnitLowerTriangular, :L))
333-
333+
if !(elty1 == elty2 || elty1 (ComplexF32, Int) || elty1 (ComplexF32, Int))
334+
continue
335+
end
334336
debug && println("elty1: $elty1, A1: $t1, elty2: $elty2, A2: $t2")
335337

336338
A2 = t2(elty2 == Int ? rand(1:7, n, n) : convert(Matrix{elty2}, (elty2 <: Complex ? complex.(randn(n, n), randn(n, n)) : randn(n, n)) |> t -> cholesky(t't).U |> t -> uplo2 === :U ? t : copy(t')))
@@ -417,6 +419,12 @@ debug && println("Test basic type functionality")
417419
end
418420

419421
for eltyB in (Float32, Float64, BigFloat, ComplexF32, ComplexF64, Complex{BigFloat})
422+
# Only test methods for the same element type and a single combination of mixed element types
423+
# to avoid too much compilation
424+
if !(elty1 == eltyB || elty1 (ComplexF32, Int) || eltyB (ComplexF32, Int))
425+
continue
426+
end
427+
420428
B = convert(Matrix{eltyB}, (elty1 <: Complex ? real(A1) : A1)*fill(1., n, n))
421429

422430
debug && println("elty1: $elty1, A1: $t1, B: $eltyB")

0 commit comments

Comments
 (0)