From 1b86fe071e130a20f5685da852195f10f95fb20f Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Sat, 18 Jul 2015 12:22:01 -0400 Subject: [PATCH] Update tests for Intel 15 Make error checks more reliable and void == with doubles. --- tests/fe/non_primitive_1.cc | 4 ++-- tests/lac/vector_large_numbers.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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; } -- 2.39.5