@@ -413,25 +413,25 @@ foo!(u_vector)
413413
414414# test efficiency
415415num_allocs = @allocations foo! (u_matrix)
416- # @test num_allocs == 0
417-
418- # # issue 354
419- # @test VectorOfArray(ones(1))[:] == ones(1)
420-
421- # # check VectorOfArray indexing for a StructArray of mutable structs
422- # using StructArrays
423- # using StaticArrays: MVector, SVector
424- # x = VectorOfArray(StructArray{MVector{1, Float64}}(ntuple(_ -> [1.0, 2.0], 1)))
425- # y = 2 * x
426-
427- # # check mutable VectorOfArray assignment and broadcast
428- # x[1, 1] = 10
429- # @test x[1, 1] == 10
430- # @. x = y
431- # @test all(all.(y .== x))
432-
433- # # check immutable VectorOfArray broadcast
434- # x = VectorOfArray(StructArray{SVector{1, Float64}}(ntuple(_ -> [1.0, 2.0], 1)))
435- # y = 2 * x
436- # @. x = y
437- # @test all(all.(y .== x))
416+ @test num_allocs == 0
417+
418+ # issue 354
419+ @test VectorOfArray (ones (1 ))[:] == ones (1 )
420+
421+ # check VectorOfArray indexing for a StructArray of mutable structs
422+ using StructArrays
423+ using StaticArrays: MVector, SVector
424+ x = VectorOfArray (StructArray {MVector{1, Float64}} (ntuple (_ -> [1.0 , 2.0 ], 1 )))
425+ y = 2 * x
426+
427+ # check mutable VectorOfArray assignment and broadcast
428+ x[1 , 1 ] = 10
429+ @test x[1 , 1 ] == 10
430+ @. x = y
431+ @test all (all .(y .== x))
432+
433+ # check immutable VectorOfArray broadcast
434+ x = VectorOfArray (StructArray {SVector{1, Float64}} (ntuple (_ -> [1.0 , 2.0 ], 1 )))
435+ y = 2 * x
436+ @. x = y
437+ @test all (all .(y .== x))
0 commit comments