Skip to content

Commit ffcbf5e

Browse files
committed
Unit tests added
1 parent 28f9101 commit ffcbf5e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/partitions_test.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,13 @@ up = ap .+ 1
172172
up = 2 .* ap .+ 1
173173
@test typeof(ap) == typeof(up)
174174

175+
# Test that `zeros()` does not get screwed up
176+
ap = ArrayPartition(zeros(),[1.0])
177+
up = ap .+ 1
178+
@test typeof(ap) == typeof(up)
179+
180+
up = 2 .* ap .+ 1
181+
@test typeof(ap) == typeof(up)
175182

176183
@testset "ArrayInterface.ismutable(ArrayPartition($a, $b)) == $r" for (a, b, r) in ((1,2, false), ([1], 2, false), ([1], [2], true))
177184
@test ArrayInterface.ismutable(ArrayPartition(a, b)) == r

0 commit comments

Comments
 (0)