Skip to content

Commit

Permalink
Add more conversion tests
Browse files Browse the repository at this point in the history
  • Loading branch information
sethaxen committed Nov 30, 2023
1 parent 58592cd commit 5673ae2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions test/woodbury.jl
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,22 @@ end
@test W Wmat
@test WoodburyPDMat(A, B, big.(D)) isa WoodburyPDMat{BigFloat}
@test Matrix(WoodburyPDMat(A, B, big.(D))) Wmat

Wbig = convert(AbstractMatrix{BigFloat}, W)
@test Wbig isa WoodburyPDMat{BigFloat}
@test Wbig Wmat
@test convert(AbstractMatrix{T}, W) === W
@test W.F isa WoodburyPDFactorization
@test Matrix(W.F) Wmat

@test convert(PDMats.AbstractPDMat{T}, W) === W
Wbig2 = convert(PDMats.AbstractPDMat{BigFloat}, W)
@test Wbig2 isa WoodburyPDMat{BigFloat}
@test Wbig2 == Wbig

@test convert(WoodburyPDMat{T}, W) === W
@test convert(WoodburyPDMat{BigFloat}, W) == Wbig

test_factorization(W)
end

Expand Down

0 comments on commit 5673ae2

Please sign in to comment.