From 975a264e3baa64bd8cbd4aa6945d11e0f5b4a16c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dennis=20Gl=C3=A4ser?= <dennis.glaeser@iws.uni-stuttgart.de> Date: Thu, 19 Oct 2023 08:13:41 +0200 Subject: [PATCH] [test][timeloop] use relative criterion for tend --- test/common/timeloop/test_timeloop.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/common/timeloop/test_timeloop.cc b/test/common/timeloop/test_timeloop.cc index 52f38ac206..d1b3ab72b7 100644 --- a/test/common/timeloop/test_timeloop.cc +++ b/test/common/timeloop/test_timeloop.cc @@ -69,7 +69,7 @@ void testTimeLoops(double tStart, timeLoop.finalize(); - if (std::abs(timeLoop.time()-tEnd) > 1e-15) + if (std::abs(timeLoop.time()-tEnd) > 1e-15*timeSpan) DUNE_THROW(Dune::InvalidStateException, "Ended with wrong end time!"); } @@ -150,7 +150,7 @@ void testTimeLoops(double tStart, timeLoop.finalize(); - if (std::abs(timeLoop.time()-1e9*timeSpan) > 1e-15) + if (std::abs(timeLoop.time()-1e9*timeSpan) > 1e-15*timeSpan) DUNE_THROW(Dune::InvalidStateException, "Ended with wrong end time!"); } -- GitLab