Skip to content

Commit c5d7515

Browse files
authored
Merge pull request #270 from JuliaArrays/ksh/minitest
Sm0l tests
2 parents ab04f58 + 799a3b9 commit c5d7515

File tree

3 files changed

+9
-0
lines changed

3 files changed

+9
-0
lines changed

test/SDiagonal.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@
9696
@test (2*m/2)' == m
9797
@test 2m == m + m
9898
@test -(-m) == m
99+
@test m - SMatrix{4,4}(zeros(4,4)) == m
99100
@test m*0 == m - m
100101

101102
@test m*inv(m) == m/m == m\m == eye(SDiagonal{4,Float64})
@@ -105,5 +106,7 @@
105106
@test m\[1; 1; 1; 1] == [11; 12; 13; 14].\[1; 1; 1; 1]
106107
@test SMatrix{4,4}(eye(4))*m == m
107108
@test m*SMatrix{4,4}(eye(4)) == m
109+
@test SMatrix{4,4}(eye(4))/m == diagm([11; 12; 13; 14].\[1; 1; 1; 1])
110+
@test m\SMatrix{4,4}(eye(4)) == diagm([11; 12; 13; 14].\[1; 1; 1; 1])
108111
end
109112
end

test/SUnitRange.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010

1111
@test_throws Exception StaticArrays.SUnitRange{1, -1}()
1212
@test_throws TypeError StaticArrays.SUnitRange{1, 1.5}()
13+
14+
ur_str = sprint(show, StaticArrays.SUnitRange)
15+
@test ur_str == "SUnitRange"
1316
end

test/Scalar.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,7 @@ using StaticArrays, Base.Test
88
@test Scalar(2)[] == 2
99
@test Tuple(Scalar(2)) == (2,)
1010
@test Tuple(convert(Scalar{Float64}, [2.0])) == (2.0,)
11+
a = Array{Float64, 0}()
12+
a[] = 2
13+
@test Scalar(a)[] == 2
1114
end

0 commit comments

Comments
 (0)