Skip to content

Commit af17d47

Browse files
committed
fix test - previous version had memory from fill(::Vector, ...)
1 parent b9a6f23 commit af17d47

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

test/basic_indexing.jl

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,8 +238,8 @@ a[[1, 3, 8]]
238238
# multidimensional array of arrays
239239
####################################################################
240240

241-
u_matrix = VectorOfArray(fill([1, 2], 2, 3))
242-
u_vector = VectorOfArray(vec(u_matrix.u))
241+
u_matrix = VectorOfArray([[1, 2] for i in 1:2, j in 1:3])
242+
u_vector = VectorOfArray([[1, 2] for i in 1:6])
243243

244244
# test broadcasting
245245
function foo!(u)
@@ -248,7 +248,8 @@ function foo!(u)
248248
end
249249
foo!(u_matrix)
250250
foo!(u_vector)
251-
@test u_matrix u_vector
251+
@test all(u_matrix .== [3, 10])
252+
@test all(vec(u_matrix) .≈ vec(u_vector))
252253

253254
# test that, for VectorOfArray with multi-dimensional parent arrays,
254255
# `similar` preserves the structure of the parent array

0 commit comments

Comments
 (0)