File tree Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Expand file tree Collapse file tree 3 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 96
96
@test (2 * m/ 2 )' == m
97
97
@test 2 m == m + m
98
98
@test - (- m) == m
99
+ @test m - SMatrix {4,4} (zeros (4 ,4 )) == m
99
100
@test m* 0 == m - m
100
101
101
102
@test m* inv (m) == m/ m == m\ m == eye (SDiagonal{4 ,Float64})
105
106
@test m\ [1 ; 1 ; 1 ; 1 ] == [11 ; 12 ; 13 ; 14 ]. \ [1 ; 1 ; 1 ; 1 ]
106
107
@test SMatrix {4,4} (eye (4 ))* m == m
107
108
@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 ])
108
111
end
109
112
end
Original file line number Diff line number Diff line change 10
10
11
11
@test_throws Exception StaticArrays. SUnitRange {1, -1} ()
12
12
@test_throws TypeError StaticArrays. SUnitRange {1, 1.5} ()
13
+
14
+ ur_str = sprint (show, StaticArrays. SUnitRange)
15
+ @test ur_str == " SUnitRange"
13
16
end
Original file line number Diff line number Diff line change @@ -8,4 +8,7 @@ using StaticArrays, Base.Test
8
8
@test Scalar (2 )[] == 2
9
9
@test Tuple (Scalar (2 )) == (2 ,)
10
10
@test Tuple (convert (Scalar{Float64}, [2.0 ])) == (2.0 ,)
11
+ a = Array {Float64, 0} ()
12
+ a[] = 2
13
+ @test Scalar (a)[] == 2
11
14
end
You can’t perform that action at this time.
0 commit comments