From b3b50736de1fc942b008a526a1e1b0b761ff0681 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Mon, 13 Mar 2017 14:55:17 +0000 Subject: Use boost check close for doubles which previous failed under valgrind --- slicer/test/serializers.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slicer/test/serializers.cpp b/slicer/test/serializers.cpp index 350d570..f9ee4c1 100644 --- a/slicer/test/serializers.cpp +++ b/slicer/test/serializers.cpp @@ -114,7 +114,7 @@ checkBuiltIns_valuesCorrect(const TestModule::BuiltInsPtr & bt) BOOST_REQUIRE_EQUAL(bt->mint, 80); BOOST_REQUIRE_EQUAL(bt->mlong, 800); BOOST_REQUIRE_EQUAL(bt->mfloat, 3.125); - BOOST_REQUIRE_EQUAL(bt->mdouble, 3.0625); + BOOST_REQUIRE_CLOSE(bt->mdouble, 3.0625, 1); BOOST_REQUIRE_EQUAL(bt->mstring, "Sample text"); } @@ -127,7 +127,7 @@ checkBuiltIns3_valuesCorrect(const TestModule::BuiltInsPtr & bt) BOOST_REQUIRE_EQUAL(bt->mint, -80); BOOST_REQUIRE_EQUAL(bt->mlong, -800); BOOST_REQUIRE_EQUAL(bt->mfloat, -3.125); - BOOST_REQUIRE_EQUAL(bt->mdouble, -3.0625); + BOOST_REQUIRE_CLOSE(bt->mdouble, -3.0625, 1); BOOST_REQUIRE_EQUAL(bt->mstring, "-Sample text-"); } -- cgit v1.2.3