Skip to content

Commit 6cf6d8f

Browse files
committed
add test
1 parent 8b58d81 commit 6cf6d8f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/basic_indexing.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,10 @@ foo!(u_matrix)
250250
foo!(u_vector)
251251
@test u_matrix u_vector
252252

253+
# test that, for VectorOfArray with multi-dimensional parent arrays,
254+
# `similar` preserves the structure of the parent array
255+
@test typeof(parent(similar(u_matrix))) == typeof(parent(u_matrix))
256+
253257
# test efficiency
254258
num_allocs = @allocations foo!(u_matrix)
255259
@test num_allocs == 0

0 commit comments

Comments
 (0)