Skip to content

Commit 1638362

Browse files
committed
Added tests to check correct eltype of arraypartitions with vectors of
static arrays.
1 parent f65f667 commit 1638362

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using Test, RecursiveArrayTools, StaticArrays
2+
3+
p = ArrayPartition((zeros(Float32, 2), zeros(SMatrix{2,2, Int64},2), zeros(SVector{3, Float64}, 2)))
4+
@test eltype(p)==Float64
5+
@test recursive_bottom_eltype(p)==Float64
6+
@test recursive_unitless_eltype(p)==Float64
7+
@test recursive_unitless_bottom_eltype(p)==Float64
8+
9+
p2 = similar(p)
10+
@test typeof(p2)==typeof(p)

0 commit comments

Comments
 (0)