From: Matthias Maier Date: Mon, 22 Jul 2024 14:30:05 +0000 (-0500) Subject: Test opencascade/stl_refinement: disable floating point exceptions X-Git-Tag: v9.6.0-rc1~32^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=952e0696a82d3a3aff6568e6b97be907dc77e33b;p=dealii.git Test opencascade/stl_refinement: disable floating point exceptions --- 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;