Skip to content

Commit 107fe3c

Browse files
committed
add tests
1 parent 9058612 commit 107fe3c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/basic_indexing.jl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,3 +262,12 @@ num_allocs = @allocations foo!(u_matrix)
262262

263263
# issue 354
264264
@test VectorOfArray(ones(1))[:] == ones(1)
265+
266+
# check VectorOfArray indexing for a StructArray of mutable structs
267+
using StructArrays
268+
using StaticArrays: MVector
269+
x = VectorOfArray(StructArray{MVector{1, Float64}}(ntuple(_ -> [1.0, 2.0], 1)))
270+
271+
# check VectorOfArray assignment
272+
x[1, 1] = 10
273+
@test x[1, 1] == 10

0 commit comments

Comments
 (0)