Skip to content

Commit 2ec774f

Browse files
committed
Reduce number of test combinations in test/triangular.jl
1 parent ff78c38 commit 2ec774f

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

test/triangular.jl

+11
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,11 @@ Base.getindex(A::MyTriangular, i::Int, j::Int) = A.data[i,j]
346346

347347
# Begin loop for second Triangular matrix
348348
@testset for elty2 in (Float32, Float64, BigFloat, ComplexF32, ComplexF64, Complex{BigFloat}, Int)
349+
# Only test methods for the same element type and a single combination of mixed element types
350+
# to avoid too much compilation
351+
if !(elty1 == elty2 || elty1 (ComplexF32, Int) || elty1 (ComplexF32, Int))
352+
continue
353+
end
349354
@testset for (t2, uplo2) in ((UpperTriangular, :U),
350355
(UnitUpperTriangular, :U),
351356
(LowerTriangular, :L),
@@ -438,6 +443,12 @@ Base.getindex(A::MyTriangular, i::Int, j::Int) = A.data[i,j]
438443
end
439444

440445
for eltyB in (Float32, Float64, BigFloat, ComplexF32, ComplexF64, Complex{BigFloat})
446+
# Only test methods for the same element type and a single combination of mixed element types
447+
# to avoid too much compilation
448+
if !(elty1 == eltyB || elty1 (ComplexF32, Int) || eltyB (ComplexF32, Int))
449+
continue
450+
end
451+
441452
B = convert(Matrix{eltyB}, (elty1 <: Complex ? real(A1) : A1)*fill(1., n, n))
442453

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

0 commit comments

Comments
 (0)