Skip to content

Commit d1f7ce2

Browse files
kshyattandyferris
authored andcommitted
Add tests for full (#173)
1 parent c8b5990 commit d1f7ce2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/abstractarray.jl

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,18 @@
6969
@test @inferred(vec(SMatrix{2, 2}([1 2; 3 4])))::SVector{4,Int} == [1, 3, 2, 4]
7070
@test @inferred(copy(SMatrix{2, 2}([1 2; 3 4]))) == [1 2; 3 4]
7171
end
72+
73+
@testset "full" begin
74+
m_a = randn(2,2)
75+
m_a = m_a*m_a.'
76+
m = SMatrix{2,2}(m_a)
77+
@test @inferred(full(Symmetric(m))) == m_a
78+
@test @inferred(full(Symmetric(m, :L))) == m_a
79+
80+
m_a = randn(2,2) + im*randn(2,2)
81+
m_a = m_a*m_a'
82+
m = SMatrix{2,2}(m_a)
83+
@test @inferred(full(Hermitian(m))) == m_a
84+
@test @inferred(full(Hermitian(m, :L))) == m_a
85+
end
7286
end

0 commit comments

Comments
 (0)