Skip to content

Commit

Permalink
1.3 doesn't even like the regular loop interface
Browse files Browse the repository at this point in the history
  • Loading branch information
aminnj committed Sep 4, 2021
1 parent 0bc8c51 commit 08380f8
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -510,23 +510,27 @@ end
end
@test nmu == 878

nmus = [0]
Threads.@threads for (i,evt) in enumerate(t)
nmus[1] += length(t.Muon_pt[i])
end
@test nmus == [878]

nmus = [0]
Threads.@threads for i in 1:length(t)
nmus[1] += length(t.Muon_pt[i])
end
@test nmus == [878]

nmus = [0]
Threads.@threads for evt in t
nmus[1] += length(evt.Muon_pt)

@static if VERSION > v"1.3.1"
nmus = [0]
Threads.@threads for (i,evt) in enumerate(t)
nmus[1] += length(t.Muon_pt[i])
end
@test nmus == [878]

nmus = [0]
Threads.@threads for evt in t
nmus[1] += length(evt.Muon_pt)
end
@test nmus == [878]
end
@test nmus == [878]

et = enumerate(t)
@test firstindex(et) == firstindex(t)
Expand Down

0 comments on commit 08380f8

Please sign in to comment.