From ceee6e89026b9fb7f66ccba7a9c4f9df0f405cd1 Mon Sep 17 00:00:00 2001 From: Florian Weik Date: Fri, 14 Sep 2018 16:43:09 +0200 Subject: [PATCH] Merge pull request #2265 from mkuron/patch-5 Fix unit test without SSE instructions --- src/core/unit_tests/field_coupling_couplings_test.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/unit_tests/field_coupling_couplings_test.cpp b/src/core/unit_tests/field_coupling_couplings_test.cpp index 268d666eff3..b14fad8e5e3 100644 --- a/src/core/unit_tests/field_coupling_couplings_test.cpp +++ b/src/core/unit_tests/field_coupling_couplings_test.cpp @@ -78,10 +78,12 @@ BOOST_AUTO_TEST_CASE(scaled) { const int m_id; }; - BOOST_CHECK((1.23 * 2.) == scaled_coupling(Particle(0), 2.)); - BOOST_CHECK((default_val * 3.) == scaled_coupling(Particle(1), 3.)); - BOOST_CHECK((3.45 * 4.) == scaled_coupling(Particle(2), 4.)); - BOOST_CHECK((default_val * 5.) == scaled_coupling(Particle(3), 5.)); + BOOST_CHECK_CLOSE(1.23 * 2., scaled_coupling(Particle(0), 2.), 1e-14); + BOOST_CHECK_CLOSE(default_val * 3., scaled_coupling(Particle(1), 3.), + 1e-14); + BOOST_CHECK_CLOSE(3.45 * 4., scaled_coupling(Particle(2), 4.), 1e-14); + BOOST_CHECK_CLOSE(default_val * 5., scaled_coupling(Particle(3), 5.), + 1e-14); } }