diff options
author | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2017-03-13 14:55:17 +0000 |
---|---|---|
committer | Dan Goodliffe <daniel.goodliffe@pressassociation.com> | 2017-03-13 14:55:17 +0000 |
commit | b3b50736de1fc942b008a526a1e1b0b761ff0681 (patch) | |
tree | 51be57048fb74dc7c396b5e39bec89221d0f73a2 | |
parent | Use compile time formatter instead of boost::format (diff) | |
download | slicer-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.cpp | 4 |
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-"); } |