Skip to content

Commit

Permalink
Add test on filter on particle Collection using getingex
Browse files Browse the repository at this point in the history
  • Loading branch information
elehcim authored and islent committed Oct 29, 2021
1 parent b96b441 commit c5e784e
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ header, data = read_gadget2("gassphere_littleendian.gadget2") # 1472 gas particl
h, d = read_gadget2("gadget2.format2")
@test h.npart[1] == 1472

# getindex
for i in instances(Collection)
@test length(d[i]) == h.npart[Int(i)]
end

pos = read_gadget2_pos("gadget2.format2")
@test length(pos) == 1472
@test pos[1] == PVector(-0.07133729010820389*u"kpc", -0.35668644309043884*u"kpc", -0.9273847341537476*u"kpc")
Expand Down

0 comments on commit c5e784e

Please sign in to comment.