From a0acc4912c738295708dad62a8fcef68b46aebbc Mon Sep 17 00:00:00 2001 From: David Widmann Date: Mon, 5 Aug 2024 12:17:20 +0200 Subject: [PATCH] Add test from #207 --- test/pdmtypes.jl | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/pdmtypes.jl b/test/pdmtypes.jl index 9331671..ab4bac1 100644 --- a/test/pdmtypes.jl +++ b/test/pdmtypes.jl @@ -304,4 +304,12 @@ using Test @test_broken C - B isa Diagonal{Float64, Vector{Float64}} @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 + end end