Skip to content

Commit 3450c85

Browse files
committed
Added tests for new zero matrix function
1 parent daa4cb2 commit 3450c85

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/named_array_partition_tests.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,13 @@ using RecursiveArrayTools, Test
99
@test x.a ones(10)
1010
@test typeof(x .+ x[1:end]) <: Vector # test broadcast precedence
1111
@test all(x .== x[1:end])
12+
@test ArrayInterface.zeromatrix(x) isa Matrix
13+
@test size(ArrayInterface.zeromatrix(x)) == (30,30)
1214
y = copy(x)
1315
@test zero(x, (10, 20)) == zero(x) # test that ignoring dims works
1416
@test typeof(zero(x)) <: NamedArrayPartition
1517
@test (y .*= 2).a[1] 2 # test in-place bcast
18+
1619

1720
@test length(Array(x)) == 30
1821
@test typeof(Array(x)) <: Array

0 commit comments

Comments
 (0)