From 952e0696a82d3a3aff6568e6b97be907dc77e33b Mon Sep 17 00:00:00 2001 From: Matthias Maier Date: Mon, 22 Jul 2024 09:30:05 -0500 Subject: [PATCH] Test opencascade/stl_refinement: disable floating point exceptions --- tests/opencascade/stl_refinement.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/opencascade/stl_refinement.cc b/tests/opencascade/stl_refinement.cc index a630573482..4a91ac2f3c 100644 --- a/tests/opencascade/stl_refinement.cc +++ b/tests/opencascade/stl_refinement.cc @@ -33,6 +33,16 @@ using namespace OpenCASCADE; int main() { + // This test might trigger spurious floating point exception despite + // functioning properly. Simply disable floating point exceptions again + // (after they had been enabled int tests.h) +#if defined(DEBUG) && defined(DEAL_II_HAVE_FP_EXCEPTIONS) + { + const int current_fe_except = fegetexcept(); + fedisableexcept(current_fe_except); + } +#endif + TopoDS_Shape sh = read_STL(SOURCE_DIR "/stl_files/sphere_refined.stl"); Triangulation<2, 3> tria; GridIn<2, 3> gridin; -- 2.39.5