Skip to content

Commit

Permalink
more CI!
Browse files Browse the repository at this point in the history
  • Loading branch information
Moelf committed Sep 11, 2021
1 parent b75bced commit fbca0bf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/iteration.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Reads all branches from a tree.
"""
function arrays(f::ROOTFile, treename)
names = keys(f[treename])
res = Vector{Any}(undef, length(names))
res = Vector{Vector}(undef, length(names))
Threads.@threads for i in eachindex(names)
res[i] = array(f, "$treename/$(names[i])")
end
Expand Down
6 changes: 6 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ end
rootfile = ROOTFile(joinpath(SAMPLES_DIR, "tree_with_large_array.root"))
branch = rootfile["t1"]["int32_array"]
arr = UnROOT.array(rootfile, branch)
arr2 = UnROOT.arrays(rootfile, "t1")[1]

@test hash(branch) == hash(rootfile["t1"]["int32_array"])
@test hash(branch) != hash(rootfile["t1"]["float_array"])
@test arr == arr2

table = LazyTree(rootfile, "t1")
BA = LazyBranch(rootfile, branch)
@test length(arr) == length(BA)
Expand Down

0 comments on commit fbca0bf

Please sign in to comment.