@@ -6,6 +6,7 @@ using StaticArraysCore: SizedArray, SizedVector, SizedMatrix
6
6
7
7
@testset " types" begin
8
8
@test SArray {Tuple{2},Int,1} ((1 , 2 )) isa SArray
9
+ @test_throws ArgumentError SArray {Tuple{2},Int,2} ((1 , 2 ))
9
10
@test SArray {Tuple{2},Float64,1} ((1 , 2 )) isa SVector{2 ,Float64}
10
11
@test SVector {2,Int} ((1 , 2 )) isa SVector
11
12
@test SMatrix {1,2,Int} ((1 , 2 )) isa SMatrix
@@ -17,5 +18,12 @@ using StaticArraysCore: SizedArray, SizedVector, SizedMatrix
17
18
@test MMatrix {1,2,Int} ((1 , 2 )) isa MMatrix
18
19
19
20
@test SizedArray {Tuple{2},Int,2,1,Vector{Int}} ([1 , 2 ]) isa SizedArray
21
+ @test_throws DimensionMismatch SizedArray {Tuple{2},Int,2,1,Vector{Int}} ([1 , 2 , 3 ]) isa SizedArray
20
22
@test SizedArray {Tuple{2},Int,2,1,Vector{Int}} (undef) isa SizedArray
23
+ @test SizedArray {Tuple{2,3},Int,2,2,Matrix{Int}} (undef) isa SizedArray
24
+
25
+ @test_throws ArgumentError StaticArraysCore. check_array_parameters (Tuple{2.0 }, Int, Val{2 }, Val{2 })
26
+ @test StaticArraysCore. tuple_length ((5 , 3 )) == 2
27
+ @test StaticArraysCore. tuple_prod ((5 , 3 )) == 15
28
+ @test StaticArraysCore. tuple_minimum ((5 , 3 )) == 3
21
29
end
0 commit comments