Skip to content

Commit d4a4d4f

Browse files
authored
Merge pull request #266 from kshyatt/ksh/test
Run lu tests and test last inv branch
2 parents 99fbd46 + a91e4a7 commit d4a4d4f

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/inv.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,14 @@ end
7070
@test_broken norm(Matrix(sm*inv(sm) - eye(4))) < 10*norm(m*inv(m) - eye(4))
7171
end
7272

73+
@testset "Matrix inverse 5x5" begin
74+
m = randn(Float64, 5,5) + eye(5)
75+
@test inv(SMatrix{5,5}(m))::StaticMatrix inv(m)
76+
m = triu(randn(Float64, 5,5) + eye(5))
77+
@test inv(SMatrix{5,5}(m))::StaticMatrix inv(m)
78+
m = tril(randn(Float64, 5,5) + eye(5))
79+
@test inv(SMatrix{5,5}(m))::StaticMatrix inv(m)
80+
end
7381

7482
#-------------------------------------------------------------------------------
7583
# More comprehensive but qualitiative testing for inv() accuracy

test/runtests.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ include("eigen.jl")
3131
include("expm.jl")
3232
include("sqrtm.jl")
3333
include("lyap.jl")
34+
include("lu.jl")
3435
include("chol.jl")
3536
include("deque.jl")
3637
include("io.jl")

0 commit comments

Comments
 (0)