From c4ebf48f2973893a08d073a80f64af17a8d4ab27 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andr=C3=A9=20Schmidt?= <upwli@student.kit.edu>
Date: Wed, 8 Dec 2021 15:24:35 +0000
Subject: [PATCH] Adding margins

---
 tests/media/testMagneticField.cpp | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/tests/media/testMagneticField.cpp b/tests/media/testMagneticField.cpp
index 8b3eed7cb..b55265473 100644
--- a/tests/media/testMagneticField.cpp
+++ b/tests/media/testMagneticField.cpp
@@ -89,13 +89,13 @@ TEST_CASE("UniformMagneticField w/ Homogeneous Medium") {
   MagneticFieldVector Earth_B_1 = get_wmm(gCS, 2022.5, 100_km, -80, -120);
   MagneticFieldVector Earth_B_2 = get_wmm(gCS, 2022.5, 0_km, 0, 120);
   MagneticFieldVector Earth_B_3 = get_wmm(gCS, 2020, 100_km, 80, 0);
-  CHECK(Earth_B_1.getX(gCS) / 1_nT == Approx(5815));
-  CHECK(Earth_B_1.getY(gCS) / 1_nT == Approx(14803));
-  CHECK(Earth_B_1.getZ(gCS) / 1_nT == Approx(49755.3));
-  CHECK(Earth_B_2.getX(gCS) / 1_nT == Approx(39684.7));
-  CHECK(Earth_B_2.getY(gCS) / 1_nT == Approx(-42.2));
-  CHECK(Earth_B_2.getZ(gCS) / 1_nT == Approx(10809.5));
-  CHECK(Earth_B_3.getX(gCS) / 1_nT == Approx(6261.8));
-  CHECK(Earth_B_3.getY(gCS) / 1_nT == Approx(-185.5));
-  CHECK(Earth_B_3.getZ(gCS) / 1_nT == Approx(-52429.1));
+  CHECK(Earth_B_1.getX(gCS) / 1_nT == Approx(5815).margin(0.01));
+  CHECK(Earth_B_1.getY(gCS) / 1_nT == Approx(14803).margin(0.01));
+  CHECK(Earth_B_1.getZ(gCS) / 1_nT == Approx(49755.3).margin(0.01));
+  CHECK(Earth_B_2.getX(gCS) / 1_nT == Approx(39684.7).margin(0.01));
+  CHECK(Earth_B_2.getY(gCS) / 1_nT == Approx(-42.2).margin(0.01));
+  CHECK(Earth_B_2.getZ(gCS) / 1_nT == Approx(10809.5).margin(0.01));
+  CHECK(Earth_B_3.getX(gCS) / 1_nT == Approx(6261.8).margin(0.01));
+  CHECK(Earth_B_3.getY(gCS) / 1_nT == Approx(-185.5).margin(0.01));
+  CHECK(Earth_B_3.getZ(gCS) / 1_nT == Approx(-52429.1).margin(0.01));
 }
-- 
GitLab