Skip to content
Snippets Groups Projects
Commit 56e1e572 authored by stefan's avatar stefan
Browse files

again fixes for windows unit tests (double / float precision errors)

git-svn-id: https://dng.biozentrum.unibas.ch/svn/openstructure/trunk@2272 5a81b35b-ba03-0410-adc8-b2c5c5119f08
parent 438bf336
Branches
Tags
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_CLOSE(std::fabs(sm-rh.GetReal(it)),0.0,0.000001);
BOOST_CHECK_SMALL(Real(std::fabs(sm-rh.GetReal(it))),Real(1e-7));
}
}
......
......@@ -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_CLOSE(std::fabs(h3.GetReal(it)-(h1.GetReal(it)+h2.GetReal(it))),0.0,0.000001);
BOOST_REQUIRE(check_close(std::fabs(h3.GetReal(it)-(h1.GetReal(it)+h2.GetReal(it))),Real(0.0),1e-6));
} else if (ex1.Contains(it)) {
BOOST_REQUIRE(h3.GetReal(it)==h1.GetReal(it));
} else {
......@@ -324,7 +324,7 @@ void test_ImageOps()
h3=h1-h2;
for(ExtentIterator it(Extent(Point(-2,-1),Point(1,2))); !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(check_close(std::fabs(h3.GetReal(it)-(h1.GetReal(it)-h2.GetReal(it))),Real(0.0),1e-6));
} else if (ex1.Contains(it)) {
BOOST_REQUIRE(h3.GetReal(it)==h1.GetReal(it));
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment