From: Timo Heister Date: Sat, 18 Jul 2015 16:22:01 +0000 (-0400) Subject: Update tests for Intel 15 X-Git-Tag: v8.3.0-rc2~7^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1160%2Fhead;p=dealii.git Update tests for Intel 15 Make error checks more reliable and void == with doubles. --- diff --git a/tests/fe/non_primitive_1.cc b/tests/fe/non_primitive_1.cc index e6fa2beab1..88414cfbd6 100644 --- a/tests/fe/non_primitive_1.cc +++ b/tests/fe/non_primitive_1.cc @@ -325,9 +325,9 @@ test () { if (i % (dim*dim*dim) == 0) deallog << i << ' ' << p1->value() << std::endl; - AssertThrow (p1->value() == p2->value(), + AssertThrow (std::abs(p1->value() - p2->value())<1e-15, ExcInternalError()); - AssertThrow (p1->value() == p3->value(), + AssertThrow (std::abs(p1->value() - p3->value())<1e-15, ExcInternalError()); }; } diff --git a/tests/lac/vector_large_numbers.cc b/tests/lac/vector_large_numbers.cc index b720633344..71c956633f 100644 --- a/tests/lac/vector_large_numbers.cc +++ b/tests/lac/vector_large_numbers.cc @@ -56,10 +56,10 @@ void check_large_numbers() w(4) = 3e-303; w(5) = -1e-303; const double correct4 = std::sqrt(100. + 1. + 4. + 9 + 1.) * 1e-303; - AssertThrow (std::abs(w.l2_norm() - correct4) < 1e-13*correct4, ExcInternalError()); + AssertThrow (std::abs(w.l2_norm() - correct4) <= 1e-13*correct4, ExcInternalError()); const double correct5 = std::pow(1000. + 1. + 8. + 27 + 1., 1./3.) * 1e-303; - AssertThrow (std::abs(w.lp_norm(3.) - correct5) < 1e-13*correct5, ExcInternalError()); + AssertThrow (std::abs(w.lp_norm(3.) - correct5) <= 1e-13*correct5, ExcInternalError()); deallog << "OK" << std::endl; }