Skip to content

Commit 1b0e41a

Browse files
authored
Merge pull request #645 from JuliaDiff/ox/rm_static_arrays
Delete StaticArrays Projection tests
2 parents 77748b3 + a149e8a commit 1b0e41a

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

test/projection.jl

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -378,27 +378,6 @@ struct NoSuperType end
378378
@test pvec3(OffsetArray(rand(3,1), 0:2, 0:0)) isa Vector
379379
end
380380

381-
#####
382-
##### `StaticArrays`
383-
#####
384-
385-
@testset "StaticArrays" begin
386-
# There is no code for this, but when argument isa StaticArray, axes(x) === axes(dx)
387-
# implies a check, and reshape will wrap a Vector into a static SizedVector:
388-
pstat = ProjectTo(SA[1, 2, 3])
389-
@test axes(pstat(rand(3))) === (SOneTo(3),)
390-
391-
# This recurses into structured arrays:
392-
pst = ProjectTo(transpose(SA[1, 2, 3]))
393-
@test axes(pst(rand(1,3))) === (SOneTo(1), SOneTo(3))
394-
@test pst(rand(1,3)) isa Transpose
395-
396-
# When the argument is an ordinary Array, static gradients are allowed to pass,
397-
# like FillArrays. Collecting to an Array would cost a copy.
398-
pvec3 = ProjectTo([1, 2, 3])
399-
@test pvec3(SA[1, 2, 3]) isa StaticArray
400-
end
401-
402381
#####
403382
##### `ChainRulesCore`
404383
#####

0 commit comments

Comments
 (0)