Skip to content

Commit 4ab61ef

Browse files
kshyattandyferris
authored andcommitted
Two small error tests (JuliaArrays#201)
1 parent 92d6d7f commit 4ab61ef

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/eigen.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,5 +169,8 @@
169169
@test vals::SVector sort(m_d)
170170
@test eigvals(m) sort(m_d)
171171
@test eigvals(Hermitian(m)) sort(m_d)
172+
173+
# not Hermitian
174+
@test_throws Exception eig(@SMatrix randn(4,4))
172175
end
173176
end

test/solve.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@
2424
b = A*ones(elty,n)
2525
@test m(A)\v(b) ≈ A\b
2626
end =#
27+
28+
m1 = @SMatrix eye(5)
29+
m2 = @SMatrix eye(2)
30+
v = @SVector ones(4)
31+
@test_throws DimensionMismatch m1\v
32+
@test_throws DimensionMismatch m1\m2
2733
end

0 commit comments

Comments
 (0)