summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-03-13 14:55:17 +0000
committerDan Goodliffe <daniel.goodliffe@pressassociation.com>2017-03-13 14:55:17 +0000
commitb3b50736de1fc942b008a526a1e1b0b761ff0681 (patch)
tree51be57048fb74dc7c396b5e39bec89221d0f73a2
parentUse compile time formatter instead of boost::format (diff)
downloadslicer-b3b50736de1fc942b008a526a1e1b0b761ff0681.tar.bz2
slicer-b3b50736de1fc942b008a526a1e1b0b761ff0681.tar.xz
slicer-b3b50736de1fc942b008a526a1e1b0b761ff0681.zip
Use boost check close for doubles which previous failed under valgrind
-rw-r--r--slicer/test/serializers.cpp4
1 files 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-");
}