From c22c7c73844b464641572a2bd238cda2c81a1c2e Mon Sep 17 00:00:00 2001 From: Ronan Arraes Jardim Chagas Date: Tue, 11 Jun 2024 22:00:16 -0300 Subject: [PATCH] :rotating_light: Fix tests of structure copying --- test/copy.jl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/copy.jl b/test/copy.jl index a9ae79c..446f166 100644 --- a/test/copy.jl +++ b/test/copy.jl @@ -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.