Skip to content

Commit 86d12d2

Browse files
committed
Test for batched writes
1 parent 06e7c74 commit 86d12d2

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

test/runtests.jl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,24 @@ end
150150
@test typeof(newply["test"]["listprop"][1]) == Vector{proptype}
151151
@test newply["test"]["listprop"] == listprop
152152
end
153+
154+
@testset "Batched writes for homogenous properties" begin
155+
ply = Ply()
156+
nverts = 1000
157+
x, y, z = [rand(nverts) for _ = 1:3]
158+
push!(ply, PlyElement("vertex",
159+
ArrayProperty("x", x),
160+
ArrayProperty("y", y),
161+
ArrayProperty("z", z)))
162+
io = IOBuffer()
163+
save_ply(ply, io)
164+
seek(io, 0)
165+
newply = load_ply(io)
166+
@test length(newply) == 1
167+
@test newply["vertex"]["x"] == x
168+
@test newply["vertex"]["y"] == y
169+
@test newply["vertex"]["z"] == z
170+
end
153171
end
154172

155173

0 commit comments

Comments
 (0)