From 94b48f5a20ff19bf9ddb29ba5858eb27c22e2165 Mon Sep 17 00:00:00 2001 From: deal Date: Wed, 3 Mar 2004 19:29:49 +0000 Subject: [PATCH] Loosen test. git-svn-id: https://svn.dealii.org/trunk@8649 0785d39b-7218-0410-832d-ea1e28bc413d --- tests/bits/sparse_matrix_vector_07.cc | 6 +++--- tests/bits/vector_18.cc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/bits/sparse_matrix_vector_07.cc b/tests/bits/sparse_matrix_vector_07.cc index b9780b2b18..e9b7e1d535 100644 --- a/tests/bits/sparse_matrix_vector_07.cc +++ b/tests/bits/sparse_matrix_vector_07.cc @@ -1,6 +1,6 @@ //---------------------------- sparse_matrix_vector_07.cc --------------------------- -// $Id$ -// Version: $Name$ +// sparse_matrix_vector_07.cc,v 1.5 2004/02/26 17:25:45 wolf Exp +// Version: // // Copyright (C) 2004 by the deal.II authors // @@ -65,7 +65,7 @@ void test (Vector &v, Assert (x(i) == result, ExcInternalError()); } - Assert (s == x.l2_norm(), ExcInternalError()); + Assert (std::fabs((s - x.l2_norm())/s) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; } diff --git a/tests/bits/vector_18.cc b/tests/bits/vector_18.cc index d2dec18c4d..421d7dbb52 100644 --- a/tests/bits/vector_18.cc +++ b/tests/bits/vector_18.cc @@ -1,6 +1,6 @@ //---------------------------- vector_18.cc --------------------------- -// $Id$ -// Version: $Name$ +// vector_18.cc,v 1.4 2004/02/26 17:25:45 wolf Exp +// Version: // // Copyright (C) 2004 by the deal.II authors // @@ -33,7 +33,7 @@ void test (Vector &v) v.compress (); // then check the norm - Assert (v.l2_norm() == std::sqrt(norm), ExcInternalError()); + Assert (std::fabs((v.l2_norm() - std::sqrt(norm))/std::sqrt(norm)) < 1e-14, ExcInternalError()); deallog << "OK" << std::endl; } -- 2.39.5