Commit fd5a8455 authored by jstark's avatar jstark
Browse files

Replace == by isApproxEqual with tolerance.

parent 812b238c
......@@ -41,7 +41,9 @@ BOOST_AUTO_TEST_SUITE(HelpFunctionsTestSuite)
// Now we check if get_min_value returns smaller_value
auto min_value = get_min_val<Field>(g_dist);
BOOST_CHECK_MESSAGE(min_value == smaller_value, "Checking if smallest value stored in grid is returned.");
double tolerance = 1e-12;
BOOST_CHECK_MESSAGE(isApproxEqual(min_value, smaller_value, tolerance), "Checking if smallest value stored in grid "
"is returned.");
}
BOOST_AUTO_TEST_CASE(get_max_val_test)
......@@ -74,6 +76,9 @@ BOOST_AUTO_TEST_SUITE(HelpFunctionsTestSuite)
// Now we check if get_max_value returns bigger_value
auto max_value = get_max_val<Field>(g_dist);
BOOST_CHECK_MESSAGE(max_value == bigger_value, "Checking if smallest value stored in grid is returned.");
double tolerance = 1e-12;
BOOST_CHECK_MESSAGE(isApproxEqual(max_value, bigger_value, tolerance), "Checking if smallest value stored in "
"grid "
"is returned.");
}
BOOST_AUTO_TEST_SUITE_END()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment