Skip to content
Snippets Groups Projects
Commit 438bf336 authored by stefan's avatar stefan
Browse files

Fixed unit test for windows (double / float precision errors)

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2271 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 2eab968e
No related branches found
No related tags found
No related merge requests found
......@@ -53,7 +53,7 @@ void test()
h.GetReal(p2+Point(1,0))+
h.GetReal(p2+Point(0,1))+
h.GetReal(p2+Point(1,1)));
BOOST_CHECK(std::fabs(sm-rh.GetReal(it))<1e-10);
BOOST_CHECK_CLOSE(std::fabs(sm-rh.GetReal(it)),0.0,0.000001);
}
}
......
......@@ -312,7 +312,7 @@ void test_ImageOps()
ImageHandle h3=h1+h2;
for(ExtentIterator it(Extent(Point(-4,-3),Point(4,5))); !it.AtEnd(); ++it) {
if(ex1.Contains(it) && ex2.Contains(it)) {
BOOST_REQUIRE(std::fabs(h3.GetReal(it)-(h1.GetReal(it)+h2.GetReal(it)))<1e-10);
BOOST_REQUIRE_CLOSE(std::fabs(h3.GetReal(it)-(h1.GetReal(it)+h2.GetReal(it))),0.0,0.000001);
} else if (ex1.Contains(it)) {
BOOST_REQUIRE(h3.GetReal(it)==h1.GetReal(it));
} else {
......
......@@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(read_sdf)
// check properties
BOOST_CHECK(ch.HasProp("r_i_glide_rmsd"));
BOOST_CHECK_EQUAL(boost::lexical_cast<Real>(boost::trim_copy
BOOST_CHECK_EQUAL(boost::lexical_cast<float>(boost::trim_copy
(ch.GetStringProp("r_i_glide_rmsd"))),
0.543804f);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment