Skip to content

Commit

Permalink
test isposdef[!] for HermOrSym{BigFloat} (JuliaLang#22913)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre authored and jeffwong committed Jul 24, 2017
1 parent e2e058a commit fd10f3e
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions test/linalg/symmetric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,17 @@ end
@test trace(aherm) == trace(Hermitian(aherm))
end

@testset "isposdef[!]" begin
@test isposdef(Symmetric(asym)) == isposdef(asym)
@test isposdef(Hermitian(aherm)) == isposdef(aherm)
@test isposdef(Hermitian(apos)) == isposdef(apos) == true
if eltya != Int #chol! won't work with Int
@test isposdef!(Symmetric(copy(asym))) == isposdef(asym)
@test isposdef!(Hermitian(copy(aherm))) == isposdef(aherm)
@test isposdef!(Hermitian(copy(apos))) == isposdef(apos) == true
end
end

# Revisit when implemented in julia
if eltya != BigFloat
@testset "cond" begin
Expand Down Expand Up @@ -252,15 +263,6 @@ end
end
end
end

@testset "isposdef[!]" begin
@test isposdef(Symmetric(asym)) == isposdef(full(Symmetric(asym)))
@test isposdef(Hermitian(aherm)) == isposdef(full(Hermitian(aherm)))
if eltya != Int #chol! won't work with Int
@test isposdef!(Symmetric(copy(asym))) == isposdef(full(Symmetric(asym)))
@test isposdef!(Hermitian(copy(aherm))) == isposdef(full(Hermitian(aherm)))
end
end
end

@testset "linalg binary ops" begin
Expand Down

0 comments on commit fd10f3e

Please sign in to comment.