@@ -4,10 +4,17 @@ import ArrayInterface: has_sparsestruct, findstructralnz, fast_scalar_indexing,
4
4
@test ArrayInterface. ismutable (rand (3 ))
5
5
6
6
using 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
9
13
@test ArrayInterface. ismutable (1 : 10 ) == false
10
14
@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
+
11
18
@test isone (ArrayInterface. known_first (typeof (StaticArrays. SOneTo (7 ))))
12
19
@test ArrayInterface. known_last (typeof (StaticArrays. SOneTo (7 ))) == 7
13
20
@test ArrayInterface. known_length (typeof (StaticArrays. SOneTo (7 ))) == 7
@@ -47,6 +54,7 @@ rowind,colind=findstructralnz(Sp)
47
54
@test ArrayInterface. ismutable (spzeros (1 , 1 ))
48
55
@test ArrayInterface. ismutable (spzeros (1 ))
49
56
57
+
50
58
@test ! fast_scalar_indexing (qr (rand (10 , 10 )). Q)
51
59
@test ! fast_scalar_indexing (qr (rand (10 , 10 ), Val (true )). Q)
52
60
@test ! fast_scalar_indexing (lq (rand (10 , 10 )). Q)
0 commit comments