Skip to content

Commit b5cc56a

Browse files
authored
Test two combinations in triangular test sets (#1294)
Change `elty1` to `elty2` to avoid repeating the condition.
1 parent d451800 commit b5cc56a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/testtriag.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -314,10 +314,10 @@ function test_triangular(elty1_types)
314314
@test ((A1 \ A1)::t1) M1 \ M1
315315

316316
# Begin loop for second Triangular matrix
317-
@testset for elty2 in (Float32, Float64, BigFloat, ComplexF32, ComplexF64, Complex{BigFloat}, Int)
317+
@testset for elty2 in push!(Set((ComplexF32, Int)), elty1)
318318
# Only test methods for the same element type and a single combination of mixed element types
319319
# to avoid too much compilation
320-
if !(elty1 == elty2 || elty1 (ComplexF32, Int) || elty1 (ComplexF32, Int))
320+
if elty1 (elty2, ComplexF32, Int)
321321
continue
322322
end
323323
@testset for (t2, uplo2) in ((UpperTriangular, :U),
@@ -409,10 +409,10 @@ function test_triangular(elty1_types)
409409
end
410410
end
411411

412-
@testset for eltyB in (Float32, Float64, BigFloat, ComplexF32, ComplexF64, Complex{BigFloat})
412+
@testset for eltyB in push!(Set((ComplexF32,)), elty1)
413413
# Only test methods for the same element type and a single combination of mixed element types
414414
# to avoid too much compilation
415-
if !(elty1 == eltyB || elty1 (ComplexF32, Int) || eltyB (ComplexF32, Int))
415+
if elty1 (eltyB, ComplexF32, Int)
416416
continue
417417
end
418418

0 commit comments

Comments
 (0)