@@ -4,10 +4,17 @@ import ArrayInterface: has_sparsestruct, findstructralnz, fast_scalar_indexing,
44@test ArrayInterface. ismutable (rand (3 ))
55
66using StaticArrays
7- @test ArrayInterface. ismutable (@SVector [1 ,2 ,3 ]) == false
8- @test ArrayInterface. ismutable (@MVector [1 ,2 ,3 ]) == true
7+ x = @SVector [1 ,2 ,3 ]
8+ @test ArrayInterface. ismutable (x) == false
9+ @test ArrayInterface. ismutable (view (x, 1 : 2 )) == false
10+ x = @MVector [1 ,2 ,3 ]
11+ @test ArrayInterface. ismutable (x) == true
12+ @test ArrayInterface. ismutable (view (x, 1 : 2 )) == true
913@test ArrayInterface. ismutable (1 : 10 ) == false
1014@test ArrayInterface. ismutable ((0.1 ,1.0 )) == false
15+ @test ArrayInterface. ismutable (Base. ImmutableDict{Symbol,Int64}) == false
16+ @test ArrayInterface. ismutable ((;x= 1 )) == false
17+
1118@test isone (ArrayInterface. known_first (typeof (StaticArrays. SOneTo (7 ))))
1219@test ArrayInterface. known_last (typeof (StaticArrays. SOneTo (7 ))) == 7
1320@test ArrayInterface. known_length (typeof (StaticArrays. SOneTo (7 ))) == 7
@@ -47,6 +54,7 @@ rowind,colind=findstructralnz(Sp)
4754@test ArrayInterface. ismutable (spzeros (1 , 1 ))
4855@test ArrayInterface. ismutable (spzeros (1 ))
4956
57+
5058@test ! fast_scalar_indexing (qr (rand (10 , 10 )). Q)
5159@test ! fast_scalar_indexing (qr (rand (10 , 10 ), Val (true )). Q)
5260@test ! fast_scalar_indexing (lq (rand (10 , 10 )). Q)
0 commit comments