@@ -4,6 +4,10 @@ using OffsetArrays, BenchmarkTools
4
4
5
5
@testset " projection" begin
6
6
7
+ # ####
8
+ # #### `Base`
9
+ # ####
10
+
7
11
@testset " Base: numbers" begin
8
12
# real / complex
9
13
@test ProjectTo (1.0 )(2.0 + 3im ) === 2.0
@@ -92,6 +96,10 @@ using OffsetArrays, BenchmarkTools
92
96
@test_throws DimensionMismatch prefvec (Ref {Any} (1 : 5 ))
93
97
end
94
98
99
+ # ####
100
+ # #### `LinearAlgebra`
101
+ # ####
102
+
95
103
@testset " LinearAlgebra: $adj vectors" for adj in [transpose, adjoint]
96
104
# adjoint vectors
97
105
padj = ProjectTo (adj ([1 ,2 ,3 ]))
@@ -189,6 +197,10 @@ using OffsetArrays, BenchmarkTools
189
197
@test_throws DimensionMismatch ptri (rand (ComplexF32, 3 , 2 ))
190
198
end
191
199
200
+ # ####
201
+ # #### `SparseArrays`
202
+ # ####
203
+
192
204
@testset " SparseArrays" begin
193
205
# vector
194
206
v = sprand (30 , 0.3 )
@@ -219,6 +231,10 @@ using OffsetArrays, BenchmarkTools
219
231
@test_throws DimensionMismatch pm (ones (Int, 5 , 20 ))
220
232
end
221
233
234
+ # ####
235
+ # #### `OffsetArrays`
236
+ # ####
237
+
222
238
@testset " OffsetArrays" begin
223
239
# While there is no code for this, the rule that it checks axes(x) == axes(dx) else
224
240
# reshape means that it restores offsets. (It throws an error on nontrivial size mismatch.)
@@ -232,6 +248,10 @@ using OffsetArrays, BenchmarkTools
232
248
233
249
end
234
250
251
+ # ####
252
+ # #### `ChainRulesCore`
253
+ # ####
254
+
235
255
@testset " AbstractZero" begin
236
256
pz = ProjectTo (ZeroTangent ())
237
257
pz (0 ) == NoTangent ()
0 commit comments