Skip to content

Commit

Permalink
Run SymTridiagonal tests only on Julia >= 1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
devmotion committed Aug 5, 2024
1 parent a0acc49 commit 8c160df
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions test/pdmtypes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -305,11 +305,14 @@ using Test
@test C - B Matrix(C) - Matrix(B)
end

# https://github.com/JuliaStats/PDMats.jl/pull/207
@testset "PDMat from SymTridiagonal" begin
S = SymTridiagonal(fill(4, 4), fill(1, 3))
M = @inferred(PDMat(S))
@test M isa PDMat{Int,<:SymTridiagonal,<:Cholesky}
@test M == S
# Ref https://github.com/JuliaStats/PDMats.jl/pull/207
# Note: `cholesky(::SymTridiagonal)` requires https://github.com/JuliaLang/julia/pull/44076
if VERSION >= v"1.8.0-DEV.1526"
@testset "PDMat from SymTridiagonal" begin
S = SymTridiagonal(fill(4, 4), fill(1, 3))
M = @inferred(PDMat(S))
@test M isa PDMat{Int,<:SymTridiagonal,<:Cholesky}
@test M == S
end
end
end

0 comments on commit 8c160df

Please sign in to comment.