From: Matthias Maier Date: Mon, 22 Jul 2024 14:35:01 +0000 (-0500) Subject: Test opencascade/stl_write: disable floating point exceptions X-Git-Tag: v9.6.0-rc1~32^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f28163dc79a248907048a415fc65bc146e1038ab;p=dealii.git Test opencascade/stl_write: disable floating point exceptions --- diff --git a/tests/opencascade/stl_write.cc b/tests/opencascade/stl_write.cc index 0d2aaca868..1234efa2c5 100644 --- a/tests/opencascade/stl_write.cc +++ b/tests/opencascade/stl_write.cc @@ -29,6 +29,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 + initlog(); TopoDS_Shape sh = read_STL(SOURCE_DIR "/stl_files/sphere_refined.stl"); write_STL(sh, "tmp.stl", 0.001, false, 1e-6, false, 0.001, false);