@@ -6,6 +6,7 @@ using StaticArraysCore: SizedArray, SizedVector, SizedMatrix
66
77@testset " types" begin
88 @test SArray {Tuple{2},Int,1} ((1 , 2 )) isa SArray
9+ @test_throws ArgumentError SArray {Tuple{2},Int,2} ((1 , 2 ))
910 @test SArray {Tuple{2},Float64,1} ((1 , 2 )) isa SVector{2 ,Float64}
1011 @test SVector {2,Int} ((1 , 2 )) isa SVector
1112 @test SMatrix {1,2,Int} ((1 , 2 )) isa SMatrix
@@ -17,5 +18,12 @@ using StaticArraysCore: SizedArray, SizedVector, SizedMatrix
1718 @test MMatrix {1,2,Int} ((1 , 2 )) isa MMatrix
1819
1920 @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
2022 @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
2129end
0 commit comments