@@ -343,13 +343,18 @@ end
343343 view (ret)[] = 0
344344 @test ret[] == 0
345345
346- ret = BlockArrays . BlockArray (zeros ())
346+ ret = BlockArray (zeros ())
347347 @test ret isa BlockArray{Float64, 0 }
348348 @test size (ret) == ()
349349 @test all (iszero, ret)
350350 @test ret[Block ()] == zeros ()
351351
352- ret = BlockArrays. BlockArray (zeros (1 ,1 ))
352+ @test similar (ret) isa BlockArray{Float64, 0 }
353+ @test similar (ret, Float32) isa BlockArray{Float32, 0 }
354+ @test similar (ret, Float32, ()) isa BlockArray{Float32, 0 }
355+ @test similar (ret, Float32, (blockedrange ([1 ]),)) isa BlockVector{Float32}
356+
357+ ret = BlockArray (zeros (1 ,1 ))
353358 @test reshape (ret, ()) isa AbstractBlockArray{Float64, 0 } # may be BlockedArray
354359 @test size (reshape (ret, ())) == ()
355360
373378 @test all (iszero, ret)
374379 @test ret[Block ()] == zeros ()
375380
376- ret = BlockArrays. BlockedArray (zeros (1 ,1 ))
381+ @test similar (ret) isa BlockedArray{Float64, 0 }
382+ @test similar (ret, Float32) isa BlockedArray{Float32, 0 }
383+ @test similar (ret, Float32, ()) isa BlockedArray{Float32, 0 }
384+ @test similar (ret, Float32, (blockedrange ([1 ]),)) isa BlockedVector{Float32}
385+
386+ ret = BlockedArray (zeros (1 ,1 ))
377387 @test reshape (ret, ()) isa BlockedArray{Float64, 0 }
378388 @test size (reshape (ret, ())) == ()
379389 end
0 commit comments