Skip to content

Commit

Permalink
🚨 Fix tests of structure copying
Browse files Browse the repository at this point in the history
  • Loading branch information
ronisbr committed Jun 12, 2024
1 parent 418c9fc commit c22c7c7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/copy.jl
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,11 @@
end

for f in fieldnames(typeof(sgp4d.sgp4ds))
@test getfield(new_sgp4d.sgp4ds, f) == getfield(sgp4d.sgp4ds, f)
# Some fields in the deep space structure can be `NaN` because they was not
# initialized for this orbit. We should skip them.
if !isnan(getfield(sgp4d.sgp4ds, f))
@test getfield(new_sgp4d.sgp4ds, f) == getfield(sgp4d.sgp4ds, f)
end
end

# Test if both structures does not share the same memory region.
Expand Down

0 comments on commit c22c7c7

Please sign in to comment.